Hi everyone,
For our conveyor system, we added a limit switch for detecting when a ball comes in and to run a motor when the ball touches a limit switch. To run this, I created a command to run a motor for a certain amount of time when the button is pressed. I’m still fairly new to java for FRC (used to use Labview until I switched) and I have never done this before where I want to call upon the command to run when the limit switch is touched.
I’m not completely sure where to put in the code to run the command when the switch is pressed, nor do I even know if this code would work so any help is appreciated.
Thanks!