View Single Post
  #3   Spotlight this post!  
Unread 17-01-2014, 09:58
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

What Signet said.

Also, if you ware using the Command Based structure with Java you can set the limit switch up to act as a button to fire a command.

Code:
final DigitalInput limitSwitch = new DigitalInput(1);
Button limitSwitchButton = new Button() {
     public boolean get() {
           return limitSwitch.get();
     }
};
limitSwitchButton.whenPressed(new SomethingCommand());
Reply With Quote