With the drivetrain working, it's time to apply the same organizational logic (seen in Lesson 3) to the mechanisms that actually score points in the game.
Thinking in subsystemsLink to this section
Not every part of the robot needs to become its own class — but any mechanism with its own operating logic usually deserves one. Separating that logic prevents one mechanism's code from accidentally interfering with another's.
- Identify which parts of the robot deserve their own class.
- Separate the logic of each mechanism.
Intake and LiftLink to this section
Building an intake subsystem and a lift subsystem in practice is the exercise that consolidates everything seen so far: motors, sensors, encoders and code organization all working together within a clear structure.
- Build an intake subsystem hands-on.
- Build a lift subsystem.
- Control the mechanisms from the OpMode.
Putting it all togetherLink to this section
The real test of good code organization is seeing multiple subsystems working at the same time without the code turning into a mess — this only happens if the decisions from Lesson 3 were properly applied from the start.
- Make different subsystems work together.
- Keep the code organized even as the robot gets more complex.