|
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
|