📄️ Base Class (Step 1)
When structuring your FTC code, we recommend using a central class that acts as a hub for all of your hardware initializations, global variables, module classes, and utility functions. You can then create your opModes such that it is an extension of this base class so you can use all the methods within it.
📄️ Module Classes (Step 2)
Consider the base class to be the empty skeleton of your robot, a base class with no module classes is an empty robot. Each of your module classes will represent a hardware module on your robot such as your drive system, linear slide system, claws, etc. And each of your modules will contain some combination of sensors, motors, and servos. The purpose of your module classes will contain functions that control these hardware mechanisms to perform your functions.
📄️ OpMode Classes (Step 3)
Going along with the robot established in the previous module, we will now create an OpMode for our robot with a single motor connected to an encoder. Creating the opMode is very simple.