Java vs. C++

Is there any basic robot code from Github?

bc I’m very lost on where to start

Start with the getting started documentation as the first thing to do.

If you understand (at a basic level) the Command-Based framework, then you can go here next.

If you DO NOT understand the Command-Based framework, then you need to start here.

I tried to create a new timed robot project but it says that Java 11 is missing or something like that and that I might have compilation errors. How do I fix that?

Have you set/updated your JAVA_HOME and PATH environmental variables?

Did you use the WPILib installer to setup your environment (assuming Windows)?

This is poor advice. LabView has a small fraction of the community support that Java has, and on top of that makes it exceedingly difficult to share code or to use a sane version control system.

It also looks like literal spaghetti, but some people seem to like that.


i’m kidding I hate labVIEW it sucks defenitely use Java

I’ll put in a plug for the 0 to Autonomous videos. They are a great intro that will quickly get your robot moving. 0 to Autonomous


We appreciate the plug!

4 episodes in so far, so over an hour of content. We hope to release 6 more.


Keep in mind that I Know literally nothing ab java or VS code. I’ve only done a tiny bit of arduino and that gives me nothing for FRC. Could you explain the java home and path stuff?

Using MacBook

Thanks for the plug. These Videos are helping a ton.

Basically, when you run Java commands to compile/run code and stuff, it looks through your system’s environmental variables (list of directories/folder locations) to find matching executable files that the system can run.
To set stuff up, this guide should work. You can probably skip the downloading JDK stuff and go directly to setting PATH, JAVA_HOME, and verifying that it works. After that, you should be able to do stuff with Java.
I hope this helps!

C++ is used a lot more in the real world. Java is almost nonexistent in real-world robotics. Something to keep in mind when choosing.

Thanks it should help.

I’m just trying to get some basic code before our competition next week.

Use this website if you decide to go for the command-based route: WPILIB Example project page. My team started out not knowing much java on week zero, and we have a fully functioning auto-aim and a few light sequence commands. We of coursed looked for help at every step of the way as the best way to learn is to fail, which we did a lot of.
Here’s our repo on GitHub

You can pm me tomorrow if you need help following and understanding anything in our code. The most important thing for you guys, though, is to get a working robot for which the examples i linked to should be a good starting point from which to work off of.

Just in case you are considering LabVIEW, here is a resource.

One of the appendices contains a method to help choose a language.

A good robot can be created using any language, but engineering review can help choose a language that will work best for your team.

1 Like

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