View Single Post
  #9   Spotlight this post!  
Unread 09-01-2010, 22:48
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Autonomous Program Switch

If you want to use a toggle switch with two positions, you would connect the standard toggle switch between the two outer wire (GND, black and SIG, white or yellow) on a standard PWM cable and connect it to the Digital IO section on the Digital Sidecar. If the input is read as HIGH or 1, then the switch is off. IF the input is read as LOW or 0, the switch is on. If you need more positions, you could either add more switches to more digital inputs OR:

Wire several resistors with different values paralell to each other and fed by the +5 (center, red) wire on a PWM cable. Each would be connected to a different position on a multi-position rotary switch and the output of the switch would be fed to the SIG (white) wire on the PWM cable, which would be connected to a analog input on the analog breakout board of the cRio.

If you want to set an analog value, such as a wait delay, you could wire a pot with the outer wires to +5 and GND and the wiper to SIG and connect that to an analog input.

We have done all three of these, no problems. One thing to watch for is if you get a signal from the Driver Station during Auton, it might just send 0's for the joysticks and dig. io's when in auto so you can't drive in auton. In that case, you would have to put it on the robot.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack