
11-01-2016, 06:55
|
 |
Bolton Bear Bots Member
AKA: Maxwell Huffman
 FRC #3666 (Bolton Bear Bots)
Team Role: Programmer
|
|
Join Date: Jan 2016
Rookie Year: 2013
Location: Alexandria Louisiana
Posts: 24
|
|
|
Re: How to wire Digital Inputs and Outputs and Analog Inputs?
Quote:
Originally Posted by lethc
The switch that you posted is a SPDT switch (single pull double throw). It outputs high to whichever side the switch is moved to. I'd use it as a SPST (single pull single throw) switch, because you're just looking to alternate between on and off. This means wiring one side (the 'on' side) to a signal pin of a DIO port. The middle of the switch should be wired to ground.
A potentiometer is a variable resistor. Here is a resource on how to wire a potentiometer. Wire the output wire to the signal pin on the RoboRIO.
|
Quote:
Originally Posted by rich2202
Wire the outsides to Ground and +, and the middle to Signal.
For the Switch, the Signal wire will either be connected to Ground (0) or + (1).
For the Pot, the Signal wire will read the distance the pot is rotated.
You will want to adopt a convention on which side is Ground vs +.
I believe the Ports on the Robo Rio are: Ground, +, Signal. With + always in the middle, you don't damage your equipment if you accidentally plug in the connector backwards.
BTW: An easier way to control Autonomous is the Smart Dashboard. Put a field on the screen that the Driver can change. Read the value at the beginning of Autonomous.
|
Thank you both for your help!
|