2023_10_03 - Dutton-Christian-Robotics/Learning-to-Code GitHub Wiki
Review
Mecanum Wheels
- How they're on the robot is important
Concepts
- DRY: Don't Repeat Yourself
- more repetitive code = more opportunities for small mistakes
- more repetitive code = harder to made broad changes
- Writing reusable methods
- Importance of scope
- the importance of case
- flat/lower case
- upper case
- camel case
- Pascal case
- snake case
- kebob case
- screaming snake
- screaming kebob
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