Failed deploy the code

Why i always failed to deploy my code to robotrio
I use wired to connect robot and vsCode says i deployed my code successfully. However, the drivestation says I do not deploy my code

Error at frc.robot.subsystems.DriveSubsystem.<init> and Resource already allocated would lead me to believe that you have initialized multiple objects using the same port (DIO, PWN, Analog, Relay, ect.) in your DriveSubsystem class. Check that you aren’t accidentally reusing a PWM port in your object initialization.

So I put my code in github and share links to you

I have uploaded code to github and this is link

You are creating two Drivesubsystem objects. One on and a second one on This means you are trying to initialize two sets of victor motor controller objects that use the same ports. I’d recommend removing the DriveSubsystem object in

Ok, thanks

can i ask another question?
I want to update robot rio and deploy the code but I cannot connect to the robot rio
I have tried wire and WLAN to connect

did you try USB? I believe that is the recommended method for imaging the RoboRIO. Remember to select Rescan after connecting for it to try looking again.

1 Like

yes, I try usb and I also try WLAN

Here is the guide to Imaging your roboRIO. Have you followed all of the troubleshooting steps at the bottom? Do you have questions about any of them?

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