Creating a ProjectΒΆ

This guide will show ho to create a Java or C++ project for use in robotics

Open the appropriate VS Code FRC VS Code 2020 and hit CTRL + Shift + P. This will open the command palette in VS Code. Consult the Getting to know VS Code section if you are unsure of what to do!

In the command palette search for the command WPILib: Create a new project. An example is shown below.

../../../_images/creating-a-project-1.png

This will open the project creator window

../../../_images/creating-a-project-2.png
  1. Start by clicking on the Select a project type (Example or Template) button and select template

  2. Chose a programing language by selecting the Select a language button. In this case Java

  3. For Select a project base select Old Command Robot

  4. Chose a folder location to store the project

  5. Enter an appropriate project name

  6. Enter your team number

An example of a filled out project creator is shown below

../../../_images/creating-a-project-3.png

Hit Generate Project to finalize the creation of the project. There will be a prompt as shown to open in a new window or the current window. A new window will open another instance of VS Code whereas the current window will close the any open project you have and place this project in the currently opened VS Code window.

../../../_images/creating-a-project-4.png

Note

The project will then automatically build the for the first time. If the build is not successful consult the troubleshooting section

The VS Code window should now look like this and a Java project has been created!

../../../_images/creating-a-project-5.png

Caution

Anti-virus might need to be disabled in order for a C++ project to compile

Open the appropriate VS Code FRC VS Code 2020 and hit CTRL + Shift + P. This will open the command palette in VS Code. Consult the Getting to know VS Code section if you are unsure of what to do!

In the command palette search for the command WPILib: Create a new project. An example is shown below.

../../../_images/creating-a-project-11.png

This will open the project creator window

../../../_images/creating-a-project-21.png
  1. Start by clicking on the Select a project type (Example or Template) button and select template

  2. Chose a programing language by selecting the Select a language button. In this case cpp

  3. For Select a project base select Old Command Robot

  4. Chose a folder location to store the project

  5. Enter an appropriate project name

  6. Enter your team number

An example of a filled out project creator is shown below

../../../_images/creating-a-project-31.png

Hit Generate Project to finalize the creation of the project. There will be a prompt as shown to open in a new window or the current window. A new window will open another instance of VS Code whereas the current window will close the any open project you have and place this project in the currently opened VS Code window.

../../../_images/creating-a-project-41.png

Note

The project will then automatically build the for the first time. If the build is not successful consult the troubleshooting section

The VS Code window should now look like this and a Java project has been created!

../../../_images/creating-a-project-51.png