|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
How to wire Digital Inputs and Outputs and Analog Inputs? (SOLVED)
Hello! Thank you for taking the time to read my post and hopefully help me!
I almost completely understand how to take the values from a digital input/analog input and utilize them within our team's code, but I have no idea on where to even begin on the roboRIO itself. For example, if I wanted this simple switch mounted on the robot to control whether the robot ran our autonomous code or did not run our autonomous code, how would I wire it to the roboRIO DIO so that I could call for it's T/F value in LabView? ![]() The same question applies to this potentiometer, except for analog values rather than T/F. ![]() This is a very rudimentary question that you can probably answer in minutes, but I just wanted to ask the you guys first so that I don't accidentally hurt the board. I couldn't find my answer after using google for an hour because I don't know the proper terms. Thank you for your help! Bonus Question: What would a potentiometer that has specific values be named? Specifically one that has at least 4 distinct analog value outputs. Last edited by MAXOFLIFE : 11-01-2016 at 06:56. |
|
#2
|
||||
|
||||
|
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. |
|
#3
|
|||
|
|||
|
Re: How to wire Digital Inputs and Outputs and Analog Inputs?
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. Last edited by rich2202 : 11-01-2016 at 06:11. |
|
#4
|
||||
|
||||
|
Re: How to wire Digital Inputs and Outputs and Analog Inputs?
Quote:
Quote:
|
|
#5
|
||||
|
||||
|
Re: How to wire Digital Inputs and Outputs and Analog Inputs?
The signal wire should go to the pot wiper (center tap) the + and - to either side. If you put the + to the center tap you're creating a direct short when the wiper is all the way toward the -
Last edited by CryptoStorm : 14-01-2016 at 08:36. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|