LED's Before a match?

Are you allowed to have parts on on before a match starts e.g. camera’s, LED’s or sensors, while you are placing the robot down?

If you find/know an answer please provide the relevant rules

Yes to camera’s, LED’s and sensors.

What you can’t have on is “anything that moves” (motors, pneumatics, servos). I don’t think there is specifically a rule about this other than you must use the roboRIO and all of those things are disabled by the roboRIO until it is enabled.

3 Likes

I recently saw this YouTube video which showed the robot using LEDs to change color when the robot is in position for auto-making placing the robot on the field easy and accurate. A comment left on the video: “How do you run code before autonomous starts? Doesn’t wpilib or the robo rio connection restrict that?” sums up my question how are they legally allowed to do this before the match starts?

Don’t you do it in disabledPeriodic?

1 Like

By default, commands don’t run when the robot is disabled. To override this, implement runsWhenDisabled() or wrap the command with ignoringDisabled(). The software won’t let you actuate motors when disabled.

2 Likes

robotPeriodic() is always available and disabledPeriodic() before the match begins as noted here and also the 3 second period between auto and teleop. You don’t have to use only command-based programming although that may be a good idea to use and @bovlb told you how. Any regular language syntax works in the iterative robot and can co-exist with command-based, too.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.