Spin Up Auton Question

Was wondering how I’d be able to fire my indexer whilst my flywheel is running during autonomous. For instance, flywheel starts, and continues to spin while a pneumatic indexer fires a few times. Flywheel is two motors.

All you got to do is use a “start spin” command. It should look something like this: Motor.spin(directionType::fwd, 600, velocityUnits::pct); (where “Motor” is going to be the name of your flywheel motors. For example, mine are named FW1 and FW2.) After that, the flywheel will continue to spin at the velocity you set, until you tell it to stop & brake (probably coast). After that line in the code simply put pne.open(); (where “pne” is the name you assigned your pneumatic cylinder in your declarations), wait for at least 100 ms, and then pne.close();.


That makes sense! Totally forgot you could just spin it endlessly until otherwise called for

1 Like