View Single Post
  #7   Spotlight this post!  
Unread 10-12-2011, 18:26
Cory's Avatar
Cory Cory is offline
Registered User
AKA: Cory McBride
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: May 2002
Rookie Year: 2001
Location: Redwood City, CA
Posts: 6,807
Cory has a reputation beyond reputeCory has a reputation beyond reputeCory has a reputation beyond reputeCory has a reputation beyond reputeCory has a reputation beyond reputeCory has a reputation beyond reputeCory has a reputation beyond reputeCory has a reputation beyond reputeCory has a reputation beyond reputeCory has a reputation beyond reputeCory has a reputation beyond repute
Send a message via AIM to Cory
Re: Arduino Board and FRC Victors

Quote:
Originally Posted by DavisC View Post
Thanks all. Yea I set it all up and tested it with the default "Servo Knob" example. Which worked great! I also added part to turn the 0 to 179 value into a -1 to 1 value and used the serial monitor to see the relative value.

Now I believe this is by far a stretch (considering the code is on the board), but has anyone successfully used a joystick with this? When using the computer, the only idea I would have is to somehow (i have no clue) send the joystick value to the board such as what the serial monitor does?

Also have you used the game pad shield to try and control it?
Sure. A joystick likely just has a potentiometer inside. Wire it to an analog input, then use the analogRead() function to get the value from the joystick. use the map() command to map the values of the joystick pot onto the range of values you are supplying the victor.

The Arduino website reference section will tell you how to setup all these commands.
__________________
2001-2004: Team 100
2006-Present: Team 254