Stop the intake on a game piece
Hold Acquire to run the intake inward. It stops when the sensor detects a game piece or when you let go. Bonus: hold Eject to run it outward.
Blocks
Tap a block to add it, or drag it into the script.
Events
Intake
Control
Script
Test
Not running- Acquire button
- Released
- Eject button
- Not in script
- Sensor
- No game piece
- Motor
- Stopped at 0%
- Command
- Idle
Build the script, then press Run script.
Teaching model. It is not WPILib code and does not connect to a robot.