2023_10_05 - Dutton-Christian-Robotics/Learning-to-Code GitHub Wiki
Review
Activities
- what happens if you comment out the property declarations?
- write a "for" loop
- write a "while" loop
- write a "do / while" loop
Concepts
- what if we have multiple opmodes and we want to make a basic change to all?
- Separation of Concerns
- our opmode is doing two things right now: explaining a robot and using a robot
- split those two things up and put robot in another class
Activities
- copy DryRobot/etc from repository
- try it out
- code in the strafe methods
- Question: how can we make this EVEN drier?
- Copy over Dryer robot
Concepts
- understanding driver controlled
- analog controls
- digital controls
- available controls
- left_stick_y, left_stick_x, right_stick_y, right_stick_x
- left_trigger, right_trigger
- left_bumper, right_bumper
- dpad_up, dpad_down, dpad_left, dpad_right
- x, y, a, b
Activities
- Copy Basic Driver Controlled
- Explain opModeIsActive
- Explain if / else if / else
- Focus on need for "else"
- Weaknesses
- Only drive at one speed; we'll solve this one first
- Each action "blocks" controls