Society of Robots - Robot Forum
Software => Software => Topic started by: airman00 on November 17, 2007, 09:12:37 PM
-
Heres my problem :
I can get one of the modified servos to go forward ( a pulse of 100 ) and another one of the modified servos to go backward ( a pulse of 169) , only at the same time.
In other words
I can do :
servo1 var portc.3 'left Servo
servo2 var portc.2 'right Servo
forward con 100
backward con 169
pulsout servo1,Forward 'pulsout to servo1 the value of Forward ( which is 100 )
Pulsout servo2,Backward
pause 18
to make one servo go backward and one go forward
BUT when I do just servo2 like follows
servo1 var portc.3 'left Servo
servo2 var portc.2 'right Servo
forward con 100
backward con 169
pulsout servo2,backward
it gets messed up and then it can only go in one direction and it doesn't reverse. But still for both of them at the same time it can do both , but not reverse one. I've tried different pulses with servo2 to get it to go backwards but its a no go.
What am I doing wrong???
I am using a PIC16F616 @ 4mhz and two modified HS-425BB servos.
-
Take one servo, and check the standard values, like 100 for backward and 200 for forward, 150 being stop. Then check the other servo. Especially note if the center (stop) value is not 150. Any deviation from this value, you add/substract from the extreme values.
-
Problem solved
I forgot to disable the A2D registers.
::)