View Single Post
  #5   Spotlight this post!  
Unread 22-02-2010, 00:23
Yuan Xue Lim's Avatar
Yuan Xue Lim Yuan Xue Lim is offline
Electrical Programmer
FRC #3017 (Project Genesis)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: NY
Posts: 37
Yuan Xue Lim is an unknown quantity at this point
Send a message via AIM to Yuan Xue Lim
Re: Limit Switch Programming Help (Have almost all of it figured out)

Quote:
Originally Posted by LavaEagle View Post
Does the limit switch need to be told the DIO Channel and the DIO Module?
or just the DIO Channel(In programming of course)

I believe we have been doing it right as far as the wiring goes. We're using black and white. White on the side tab and black on the NC or NO.
The limit switch must be connected to a female RC(PWM) connector to Digital I/O.

This is how you declare it.

Quote:
DigitalInput *limitswitch;
limitswtich = new DigitalInput(channel that you put in);
After that you should be fine. Remember that this will return you boolean statement in true or false not integers or floats.
__________________
[font="Fixedsys"][b]We Don't Hope We will.