What is an OpMode?
Last updated
Last updated
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 op modes: autonomous (Auto) and teleoperation (TeleOp). Both types of op modes have initialization, start, and stop features on the Driver Hub.
You can see in the image above that the left arrow (green) allows for the selection of Auto programs while the right arrow (blue) 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 toggle 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.
For OnBot Java, what type of OpMode you are creating is selected while making a new file.