Society of Robots - Robot Forum
Software => Software => Topic started by: SmAsH on May 08, 2009, 04:26:23 PM
-
as the title suggests i am trying to center a few servos for modification,
i have looked in the tutorial and tried downloading the .hex file but that didn't work :-\
so, my question to you is, what can i put in the arduino window to send a 1.5ms pulse?
or can i input an angle?
really confused as i am the shiz with software :-\
thanks in advance,
james
EDIT:
i uploaded this code to the roboduino and it worked...
#define Servo 10
void setup() {
pinMode(Servo, OUTPUT);
digitalWrite(Servo, LOW);
}
void loop(){
digitalWrite(Servo, HIGH);
delayMicroseconds(1500);
digitalWrite(Servo, LOW);
delayMicroseconds(9000);
}
-
There is a servo library in Arduino ;)
-
yeah, im gonna take a look at that in the morning... its 3am here :o