Quote:
Originally Posted by Alan Anderson
There is still some occasional twitchiness with Kevin's code when writing EEPROM. It doesn't affect normal robot operation, and I haven't taken the time to figure out whether it's due to interrupts being disabled briefly or some other cause.
|
The PWM code should be pretty solid at this point. If the twitchiness occurs while saving camera parameters to EEPROM, the likely problem is that I call printf() many times in rapid succession to draw the menu on the terminal screen. This bogs down the CPU and causes a long delay between PWM pulses. If the delay is long enough, the servos assume something is wrong and attempt to center the output shaft. In practice this isn't a problem and can be fixed by using a state machine to dole out the printf()s a few at a time.
-Kevin