Hello, this is our first year in FRC and while we were making our command to start and stop our winch to climb the rope we ran into a problem. We are getting an error telling us that our code is not finding our button that we are using in port 0 which is where the joystick is plugged in.
Does anyone know what we are doing wrong or how to fix it?
Warning at org.usfirst.frc.team6758.robot.Robot.disabledPeriodic(Robot.java: 71): Joystick button 6 on port 0 not available, check if controller is plugged in
Our joystick is plugged in and will register on the driver’s station.
First step is to look in the USB tab in the driver station to verify that the joystick is connected and assigned to the correct port. If you have more than one joystick connected, use the trigger to identify which joystick is assigned to which port.
Nothing obvious in the code that looks like a problem. One comment though.
If you use whileHeld(), ClimbUp.Interrupted() gets called automatically when you release the button. Then you don’t need to bother with the ClimbStop() class.
Make sure in Driver Station that you go to the USB Devices Tab and make sure your Joystick in in the correct order. And if you are using more than one Joystick/Controller in Robot Builder the “Number” is equal to the “Port Number” you are using in Drivers Station.