Journal StarWreck's Journal: RC Car Update
Andre and I tweaked the code a little bit. We changed the 8-bit analog-to-digital convertor to 10-bit and decreased the delay, this resulted in the servos running more smoothly.
Also finally completed the calculations of converting our desired duty cycle in mili-seconds to the appropriate hex value based on the frequency of the signal being output. I'll see if I can post the equation in a future journal. Changed the hex values in 3 places for each servo, so now the steering will turn dead-center when you power on the car and it can only turn so far in each direction... the servos can turn more than the gears allow them to. Don't want to burn them out. Andre calculated so precisely that the steering stops turning at the exact moment the pulse-width stops increasing or decreasing. Very effective coding.
Also finally completed the calculations of converting our desired duty cycle in mili-seconds to the appropriate hex value based on the frequency of the signal being output. I'll see if I can post the equation in a future journal. Changed the hex values in 3 places for each servo, so now the steering will turn dead-center when you power on the car and it can only turn so far in each direction... the servos can turn more than the gears allow them to. Don't want to burn them out. Andre calculated so precisely that the steering stops turning at the exact moment the pulse-width stops increasing or decreasing. Very effective coding.
RC Car Update More Login
RC Car Update
Slashdot Top Deals