|
i'm using digital pin 9 to generate the control signal for my TS-53 servo.
however when i try to make it move, it only turns a little bit for the first
command but just stops there, the motor continues vibrating though.
the idea behind my code: set servo position to '3040', then wait 10 seconds.
After that turn to '2000', wait 10 seconds and then back to '3040'. if the stop
button is pressed, the loop terminates.
void main()
{
fd(1); /* turns on motor driver 1 */
servo_a7_init(1); /* enables digital pin 9 (Port A bit 7) */
while (stop_button()==0)
{
servo_a7_pulse=3040; /*gives a 1.5 ms pulse
sleep(10.0);
servo_a7_pulse=2000;
sleep(10.0);
}
ao();
servo_a7_init(0); /* disables digital pi 9
} /* end*/
please help!!
|
|
1 Message in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|