|
Re: Programming Limit Switch
Quote:
Originally Posted by gixxy
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.
|