View Single Post
  #4   Spotlight this post!  
Unread 18-02-2013, 21:55
dheerm's Avatar
dheerm dheerm is offline
Drive Team and Head Programmer
AKA: Dheer Mirchandani
FRC #0224 (The Tribe)
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2010
Location: Piscataway
Posts: 37
dheerm will become famous soon enough
Re: How do you program limit switches?

DigitalInput name = new DigitalInput(slot)


fill in slot with the slot on the DIO that the switch is plugged into and name with whatever you want to call it.

name.get() will return you the boolean indicating whether the switch is pressed or Unpressed. If it's wired right, true will be pressed and false will be unpressed
__________________
"All you need is duct tape and a dream"

Team 224:
District Champions @TCNJ w/ Team 56 and Team 293

8th alliance captain at MAR championships w/ (take a guess) , Team 56 and Team 293.

www.team224.com
Reply With Quote