Programming Talon PWM - Java

Look at your Joystick constructors. You are creating 2 joysticks both on port 0.

1 Like

I tried multiple different controller configurations. Only using one controller right now. Also tried the arcade drive example code with the same result.

What are the SRX LEDs doing, both when joysticks are at zero, and when you’re trying to drive forward or reverse?

Flashing red under all instances.

Like this?

Indication: Both LEDs quickly blink red then off. First one LED blinks red, followed immediately by the other, then finally both LEDs are off for a small period of time.
Problem:Limit Switch or Soft Limit Activated

Or together, or alternating, or strobing one direction or the other?

They don’t blink quickly it’s more of a standard pattern of blinking. I feel like they are not either being instantiated or activated

Blinking together

Try

private SpeedController m_Left;
private SpeedController m_Right;

m_Left = new PWMTalonSRX(0);
m_Right = new PWMTalonSRX(1);
m_myRobot = new DifferentialDrive(m_Left, m_Right);
m_leftStick = new Joystick(0);
m_rightStick = new Joystick(1);

Make sure your DS has the Joysticks in the correct USB port.

That seems to indicate that you have reverse throttle all the time (?) or a failed calibration.

The blink codes are on page 32 here:

I think the lights were blinking together but they could’ve been alternating I will have to check that tomorrow I have already left for the night from our lab.

Any chance of a photo of your wiring setup?

What is this Y cable you have mentioned several times?

The lights are alternating which would indicate no pwm signals.

The Y cable links the left motors to 1 pwm signal and same for the right side.

Do the yellow wires on the SRXs connect to the PWM port 0 and 1 pins marked “S” on the RIO, and the green to the Ground symbol ⏚? If reversed or not connected there, this would cause the “no pwm” condition.

I was not there today but the robot got rewired with spark motor controllers and still did not have success. I don’t have the code that was changed but here are the pictures that was sent to me today. We used these sparks last year with no issues.

Update-
After rewiring with sparks the colors change indicating that sparks were receiving from the signals from the pwm but did not get any movement.

Um - I see four SPARK [original] motor controllers and zero Talon [anything] motor controllers in your pics. What are you actually using?

Updated above. Robot was rewired today with sparks.

SO… this is now an entirely different problem. Did you update your code? If so, what does it look like now? I never did see a link to a repository.

1 Like

So after multiple struggling days and switching to Spark motor Controllers the problem has been resolved. We used some new wire connectors this year and overlooked a wiring issue. Thanks for the assistance given and good luck to all competing in the upcoming weeks.

1 Like

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