Thread: Twitching Robot
View Single Post
  #9   Spotlight this post!  
Unread 18-01-2006, 21:56
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
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.