Skip to content

1.5.8 - Launcher Wiring

The code below hardcodes these ports. Wire to this table or the code will move the wrong thing.

DevicePlug into this printed portAddress in Constants.java
Left drive motorM1Motor 0
Intake wheel motorM2Motor 1
Flywheel motor (through MOSFET)M3Motor 2
Right drive motorM4Motor 3
Intake arm servoS1Servo 4
Gate servoS2Servo 5
Left drive encodern/aDIO 4 / 5
Right drive encodern/aDIO 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.