I just got this. Since this is a light seeking robot, if we unplug or cover up the photocells it'ss automatically stop and center teh servo's.
Right?
watching the video of this little bot, i don't think the servos are ever stationary. they are either full forward or full reverse.
after skimming through Admin's code,
i see where you were getting the servo_right(23) and servo_left(23) functions.
Admin has done all the hard work for you here and if i interpret his comments in the file: SoR_Utils.h correctly,
multiply the number in the servo_right() function by 0.0431 to get the number of milliseconds pulse sent to the servo.
for example:
servo_right(23)
23 x 0.0431 = 0.992ms
the servo_right(23) function switches on the pin, waits for 23 time delays (of 0.0431ms each) then switches off the pin again, then waits for a further 200 time delays (of 0.0431ms each).
ok, so, the center position....
35 x 0.0431 = 1.5081ms.
so if you replace the relevant part of the main() function in Admin's code with this to get both servos in their center position.
while (0) {
servo_right(35);
servo_left(35);
}
sorry for not taking the time to read the $50 code before taking you on a trip of AVR timing routines....
i was explaining how to do it from scratch.
hmm. now i think about it, the title of this thread requested 1500ms. that's 1.5 seconds. i think your decimal point is off there.
you want 1.5ms for the center position on a servo.
dunk.