View Single Post
  #2   Spotlight this post!  
Unread 11-01-2016, 00:32
lethc's Avatar
lethc lethc is offline
#gkccurse
AKA: Becker Lethcoe
FRC #1806 (S.W.A.T.)
Team Role: Alumni
 
Join Date: Nov 2012
Rookie Year: 2013
Location: Smithville, MO
Posts: 118
lethc will become famous soon enough
Re: How to wire Digital Inputs and Outputs and Analog Inputs?

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.
__________________
2016: Greater Kansas City Regional Finalists, Oklahoma Regional Winners, Tesla Semifinalists, IRI Quarterfinalists
2015: Greater Kansas City Regional Finalists, Oklahoma Regional Winners, Tesla Quarterfinalists, IRI Winners
2014: Central Illinois Regional Quarterfinalists, Greater Kansas City Regional Finalists, Newton Semifinalists
2013: Greater Kansas City Regional Winners, Oklahoma Regional Winners, Galileo Quarterfinalists