View Single Post
  #5   Spotlight this post!  
Unread 17-01-2014, 15:22
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is online now
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,722
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Programming Limit Switch

Quote:
Originally Posted by gixxy View Post
Actually there is already a class for this in WPILib: DigitalIOButton.

So you just need:
Code:
Button limitSwitchButton = new DigitalIOButton(1);
limitSwitchButton.whenPressed(new limitSwitchCommand());
Even simpler.
Reply With Quote