Thread: Limit Switch
View Single Post
  #7   Spotlight this post!  
Unread 21-02-2010, 22:58
KayyPii's Avatar
KayyPii KayyPii is offline
Registered User
FRC #1404 (SHOCKs)
Team Role: Programmer
 
Join Date: Oct 2008
Rookie Year: 2007
Location: Toronto
Posts: 45
KayyPii will become famous soon enough
Re: Limit Switch

Say if you made a limit switch and named it switch.

DigitalInput switch = new DigitalInput ( 4, 1 ); //switch on digital side car channel 1

the if may look something like

if ( switch.get () )
//do something when the switch is not tripped
else
//do something when the switch is tripped
__________________
=>"That hole you drilled is a little off."
=>"Don't panic, just make it bigger and put a washer on it!"

=>Eye ball once, and cut as many times as it takes