View Single Post
  #1   Spotlight this post!  
Unread 01-03-2009, 16:27
dboisvert dboisvert is offline
Registered User
AKA: Dan Boisvert
FRC #2405 (Divided by Zero)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Michigan
Posts: 57
dboisvert is an unknown quantity at this point
DS Digital Input/Output

Recently my team went to a competition and I asked for help with out driver station. We had purchased a few Light Switches from the local hardware store and I had no idea how to wire them properly.

So he helped me wire them properly and connect them to DS 1 and 2 on the Driver Station and now I need to figure out how to code them.

My current code looks like this

Code:
bool switch1;
switch1 = m_ds->GetDigitalIn(1);
printf("Switch Value is: %d  ", switch1);
I never got to look at the code extensively during the competition but as far as I know it printed out all 0's when the switch was in either position.


My next problem is we want to wire in a few LED's to the DS so we know what is going on with the robot

Code:
m_ds->SetDigitalOut( 1,true);
I know how to wire the led's but I need to know if this is the proper syntax to turn them on.
Reply With Quote