OpModes, or operational modes, are computer programs that are used to customize or specify the behavior of a robot. Simply put, these are the programs we create!
The Robot Controller on the Control Hub stores and executes the OpModes. The Driver Hub then allows us to initialize, start, or stop these OpModes.
In the SDK, there are two types of OpModes: autonomous (Auto) and teleoperation (TeleOp). Both types of OpModes have initialization, start, and stop features on the Driver Hub.
You can see in the image above that the left arrow (green box) allows for the selection of Auto programs while the right arrow (blue box) shows the TeleOp list.
Below shows an example of how your list of programs may appear:
When an Auto mode is selected, a 30 second timer will appear next to the play button to count down while this program is active. This can be toggled off for testing!
While an autonomous program is running, the robot will act independently without input from a gamepad. At the end of the 30 second timer the robot will automatically stop the code. If needed, a program can also be stopped early same as while running a TeleOp program.
After creating a new OpMode in Blocks, you are able to switch between the code being for autonomous or TeleOp on the top tool bar!