Electronics > Electronics
50$ robot> servo modify
razvanc_roro:
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!
hazzer123:
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
ed1380:
or use 35 cpu cycles. 20-50 control angle.
hazzer123:
Won't the length of the cpu cycle differ between microcontrollers?
ed1380:
if you use the same mcu it won't
Navigation
[0] Message Index
[#] Next page
Go to full version