Flashed all of my equipment but when I enable code it wont work

I tried flashing the new radio that everyone got in their kits this year and it ended up not working so I tried it on our radio from last year and it worked the first time, i’ve configured the radio and then loaded the firmware, I used the RIO imaging tool and updated everything, I sent my code to numerous people and everyone said my code was good, but whenever I enable code the communications, robot code, and joystick boxes all turn green, but it wont do anything when I move the controller… HELP

If you have communications and robot code green, that means the radio is connected to the robot. What does the joystick settings tab of the Driver Station show the joystick as plugged into, and how is your code set up to read the joysticks? A link to your code and a screenshot of the joystick settings tab on the DS would both be helpful.

When running into issues like this, break down the problem–is the code getting the joystick value (you can check this by printing the value in the code)? Is the code sending the joystick value to the motor controllers? Is the wiring correct for the motor controllers (are they connected to the PWM ports / CAN IDs your code is expecting)?

1 Like

If you are using the Command-based framework for your code, then also open Shuffleboard, pull out the item chooser on the left and drag the Scheduler item so you can see what code is getting executed.

Also make sure that the Scheduler is being run in your robotPeriodic() function in Robot.java.

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