The Robot Class
Welcome to the backbone of the robot— the Robot class! Without this class, your robot literally can't do anything. This is a problem if you want to win your matches.
If you look at it for a bit, you might notice that it's packed with methods. You might also notice that their names end in either Init() or Periodic(). You might also notice that they all have some state in front of them, like Autonomous or Teleop.
If you know a little bit about FRC/FTC competitions, you might know about the different stages of the game— Autonomous, Teleop, and whatever. You also might notice how some of these methods begin with words like "Autonomous" and "Teleop". All of these methods can run depending on the state of the robot.
Methods that end with Init() run only when the robot just switched to that state (for example, when a robot switches from auto to teleop, TeleopInit() will be called)
Method names that end with Periodic() run while that robot is still in that state (ex, during Teleop, TeleopPeriodic() will be run)
Here is a list of states you'd probably need to use.
Robot— runs while the robot is powered.
Auto— runs during the Autonomous period of a match
Teleop— runs during the TeleOperated period of a match
Disabled— runs when the robot is disabled (safety stop and stuff)
Test + Simulation— run when Test and Simulation modes are run
If you're wondering what Test and Simulation are for, they're just extra modes you can turn on through WPILIB's Command Palette (basically just a list of cool commands you can do).

This is how you can find the button to open the Simulation Interface, as mentioned in Running Your Code on the Romi.
Last updated