View Single Post
  #4   Spotlight this post!  
Unread 06-02-2007, 07:29
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 590
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Code to increase speed when joystick is pushed further

Quote:
Originally Posted by JoJo5 View Post
Right now, I just have tank drive-2 motors, 2wheel drive setup, with two joysticks. No matter how far the joystick is pushed forward or backward, the motors turn the same speed. How can I set it up so that when pushed a little, the motor goes a slower speed, than pushing the joystick full throttle?
Can you make sure that you are calling the Tank Drive block inside of a loop? That block takes the current joystick values and sends them to the motors. Often people only use the block once - but there should be an infinite loop in the OperatorControl function that contains those blocks so they are called repeatedly. If the block is only used once, it will only send once speed to the motors.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute