Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: razvanc_roro on May 08, 2007, 01:14:33 PM
-
I'm a novice in programming the microcontroller and I found out that the servos are being modified by this... How do I send the signal to sorvo to make 0 degrees on the gears?
Also I want to ask you if I could make this after building the whole robot and turning it on.
Thank you!
-
It depends which microcontroller.
You will need to make a delay of about 500 uS.
Then you turn on the signal pin for the servo --> call the delay --> turn off the signal pin
Repeat this a couple of dozen times a second.
For different angles, you could great a 8uS delay and loop it a number of times. This would be added onto the 500uS delay.
Using 8uS means you have the range of 0.5 - 2.5 mS in 256 steps.
Harry
-
or use 35 cpu cycles. 20-50 control angle.
-
Won't the length of the cpu cycle differ between microcontrollers?
-
if you use the same mcu it won't
-
oh yeh haha 8)
Didnt realise it was the $50 robot.