Thread: Joystick issues
View Single Post
  #3   Spotlight this post!  
Unread 28-01-2015, 15:59
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Joystick issues

You have both motors wired to the x axis of a single joystick. The first output of Index Array unless overridden by an explicit index is Axis 0 or the x axis on a flight stick.
You probably want to use the normal y axis instead.
Either wire from the second output (y-axis), rather than the first output on the Index Array, or add a constant on the left side of both Index Arrays of "1"

Since you are only using one joystick, but using it for tank drive, your robot will only ever go forwards and backwards.
You don't have anything to turn.
It's more common to use two joysticks or at least two different sticks on an xBox-like controller to control the two sides separately.

If you want arcade drive, then you'll have to mix the x/y of the single joystick yourself, since you're avoiding 2 Motor Drive/Arcade.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 28-01-2015 at 16:26.
Reply With Quote