We have 4-wheel / 4-CIM setup, each CIM running an independent speed controller. Normal drive code functions properly with the sticks, but when jump the ports on the OI to activate autonomous mode to track the light, only the back two wheels spin at all. Pulling up the dashboard viewer shows that all four CIMs are getting PWM values, yet the front two refuse to spin… :mad:
If you look at the speed controllers during autonomous mode, do the lights for the inactive motors change the same as the active ones? If Dashboard shows that the PWM values are being sent, I’m inclined to think that it would be an electrical problem rather than programming.
Which pwms are you using? If using PWMS 13-16, make sure you’ve got the call to Generate_Pwms() being called in autonomous (or use Kevin Watson’s spiffy replacement PWM13 to 16 code), or they won’t be generated.
We just use a PWM y-connector (the red/black/yellow included in KOP) to connect ONE PWM OUT channel to the pair of speed controllers for the left side motors, and a second PWM OUT channel the pair of controllers for the right side motors.
Of course the speed controller pairs should be identically calibrated …