Wired Connection from Netbeans to Robot


#1

Our team is new to using Java, and I’m the only person here who has any background with coding with it. I used Netbeans to code everything, but the issue is, the test robot that I’ve been using to test with cannot be connected to wirelessly, as is the only way I can find online.

Is there any chance anyone could provide a step-by-step tutorial on how to transfer code from Netbeans to a robot via USB?

The way they’ve done everything in the past is through LabView if that makes any difference (I personally have zero experience with LabView).


#2

Netbeans hasn’t been used to program FRC robots since 2014. 2015-2018 used Eclipse, and 2019+ is VSCode.

Have you read and followed the instructions for programming in 2019? http://wpilib.screenstepslive.com/s/currentCS/m/java


#3

I don’t have a step-by-step for you, since NetBeans is not the official IDE and I haven’t used it much in the past few years. I highly recommend you instead use VSCode. Nonetheless, here’s what I would do to get NetBeans running.

This year’s robot code uses Gradle to deploy. When you connect to the RoboRIO with USB, you should be able to ping the robot at roborio-TEAM-frc.local, where “TEAM” is your four-digit team number. In your case, it would be roborio-4539-frc.local.

NetBeans has a few Gradle plugins that you can use to easily integrate Gradle with a NetBeans project. See here.

Your current NetBeans project may or may not be set up properly for robot use. If it’s set up correctly, NetBeans should be able to recognize the Gradle project and just start uploading with the deploy task. If it’s not set up properly – that is, if it’s not a Gradle project – you’ll likely want to set up a new Gradle project for it. See here for the Screenstepslive instructions on creating a new robot project. Once this is created, you can copy your code over to the project. You don’t even have to use VSCode to program it; you can instead open the Gradle project in NetBeans once it’s created.

Simple steps:

  1. Ensure you can ping the RoboRIO when connected
  2. Install the NetBeans Gradle plugin
  3. Create a new robot project with VSCode
  4. Copy your robot code over to the project that was created with VSCode
  5. Open the Gradle project in NetBeans
  6. Run the Deploy task

#4

Thank you so much!

I’ll definitely upgrade from Netbeans and read the articles you suggested!

The only tutorials I could find were from pre-2014 so perhaps that would explain why!

Thanks!