|
Re: Twitching Robot
make sure all the variables you use for motor control are initialized before the main loop runs.
at powerup all variables have random numbers - so if you created an equation like:
motorPWM = joystick Y + offset
and offset is not set to a defined number until the loop runs once, then motorPWM can be anything from 0 to 255 on the first pass through the codes main loop.
|