1.5.8 - Launcher Wiring
1. Wire the Robot to Match the Code
Section titled “1. Wire the Robot to Match the Code”The code below hardcodes these ports. Wire to this table or the code will move the wrong thing.
| Device | Plug into this printed port | Address in Constants.java |
|---|---|---|
| Left drive motor | M1 | Motor 0 |
| Intake wheel motor | M2 | Motor 1 |
| Flywheel motor (through MOSFET) | M3 | Motor 2 |
| Right drive motor | M4 | Motor 3 |
| Intake arm servo | S1 | Servo 4 |
| Gate servo | S2 | Servo 5 |
| Left drive encoder | n/a | DIO 4 / 5 |
| Right drive encoder | n/a | DIO 10 / 11 |
Why this matters: Two numbering systems are in play at once, and mixing them is the single most common way to fry a build. The printed labels are for your hands; the code numbers are for the compiler. A motor plugged into M3 but addressed as 3 in code runs the wrong mechanism, and a servo plugged into S1 but addressed as 1 sits dead because servo numbers begin at 4.
The encoder channels are deliberately chosen far from the motor connectors so the signal cables do not run alongside the power cables. If you change a port on the robot, change the matching line in Constants.java in Step 3, and nothing else.
Answered: 0 / 0 (0%)