I am trying to figure out if the default code supports four motor control. I have a pair of CIM motors for each sides of the robot’s transmission. I have played around for a bit with things trying to get all four running on the default code. So far I can only get two at a time running on PWM 15 and 16. Does anyone have any tips? I cannot even see where in the default code this would be edited.
The easy answer is to use the pwm splitter cables to control two Victors from a single pwm output.
The long answer depends on which version of the default code you’re using and whether you want single- or dual-joystick control. Version 2.2 already puts the left and right motor control on a pair of pwm outputs each, using pwm13-16, for the single joystick option.
For default code version 2.4, you’ll have to find the spot where it controls the motors, and make it put the control on two pwm outputs. For example, you could replace something like pwm11 = lspeed; pwm12 = rspeed; with pwm9 = pwm11 = lspeed; pwm10 = pwm12 = lspeed; to get individual pwm outputs for each motor.