Spinning Teleop

I am the new programmer for our team this year and I am having trouble with our drive. When one joystick is moved forward both side move but in opposite directions, but only one talon on each side activates. I have it set as 0 and 1 as the left drive train while 2 and 3 are the right side, currently only 0 and 2 are active on one joystick. The drive is in tank and i have tried to group 0 and 1 as a speed group controller, 2 and 3 as another. Here is the code.

The first thing I see is that you are using a wpilib SpeedControllerGroup with the TalonSRX class. I believe for that to work you need to use the WPI_TalonSRX class. See https://phoenix-documentation.readthedocs.io/en/latest/ch15_WPIDrive.html

As to the running in opposite directions the SpeedControllerGroup should have a setInverted​(boolean isInverted) function.


I would also suggest setting m_myRobot after setting m_left and m_right.


Have you double-checked your wiring/address assignments? The behavior you report is exactly what I would expect if talons 0 and 1 were on opposite drive trains.

Yes, i double checked that the electrical matched the programming.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.