Visual Studio Code
Welcome to what is most likely your first introduction into Visual Studio Code! Visual Studio Code, commonly referred to as VS Code, is an integrated development environment (IDE) developed by Microsoft for Windows, Linux, macOS and web browsers.
It is a free and versatile code editor that supports almost every major programming language and framework. For VEX it will be the main IDE that you will be working with since others require internet or do not always have the capability to do more complex programming things. Now, lets start!
Once you open up VS code, you will be introduced into this menu:
The first thing we must do, is verify that the VEX extension is downloaded. You can check by looking for the VEX icon on the toolbar on the left side of your screen, It should already be on most of your computers, but just in case it isn't, I will run through the download process. For those who have it, you can skip over this next step and go to the How To Download Code section.
Vex Extension Download
- First navigate over to the extension tab in the toolbar.

- Next, Enter "Vex" into the searchbar;
- From here, Click on "Install" the top one labeled "VEX Robotics";
- And now, you wait until it's finished! Yup, it's that easy.

How to Create a Program
Now that you have the IDE set up - in order to make your robot actually do things, you'll need to create a program and write code - which will then be put onto a V5 Brain. So, first we need to create a program. You can do this by navigating over to this icon on the left toolbar.
Once you click on that, you can create a new project by clicking on the "New Project" button.

Once that is selected, make sure that you Click "V5" so that the proper firmware is in place for downloading. Please note, the "EXP" does not work to download onto the V5 Brain even though it has a very similar logo!

For ease, use the empty template or competition template. This will not affect anything code-wise.

Finally, make your program name. Please name it something appropriate, Judges do see it.
If you are unsure of what to name it, my recommendation is "9457_ V1.0" (with the underscore indicating your team letter). This leaves availability for future code revision's too!

Now that you have code it should look somewhat like this:
How to Download
Before downloading code, you first need to identify which slot you will want to download your program to. The Brain by default has 8 slots for programs. To modify which slot it is downloaded to, click this icon neart the bottom toolbar.

Before you attempt to download your program, it is generally good practice to compile your code. The icon shown below is the compiler button. This makes sure that all the syntax (AKA code language) that you use to program is valid and ready for downloading. If your syntax is not valid, you will get warnings on the terminal which indicates what and where your error is. Otherwise, if there are no issues, the terminal will tell you that the program has compiled.

The buttons shown below are to run and stop your code (respectively) once it is running on the Brain. For these buttons, you need to have a powered Brain with the existing program on it in order to activate this function.

In order to download code, the laptop/desktop used to program will need to be connected to either the Brain or the Controller via Micro-USB with the robot turned on. Once it is connected an additonal few icons will appear on the bottom toolbar. The download icon is shown below and pressing it will download your code to your robot:

Navigating to Another Program
Navigating to another program requires 2 things.
- Another V5 Program file
- The VEX extension downloaded.
Once you have these two things, it's as easy as opening another folder which contains your program. Once opened, it should auto configure for the rest.

Common Debugging Issues
COM Errors
- Hard restart your Brain and Controller.
- Let it reconnect
- Redownload
Compiler Errors
Syntax Related
- Check if you have a semi-colon ';' at the end of each line (which needs it).
- Check to make sure the a function and/or conditional has an opening bracket ' and a closing one '.
- Programming is case-sensitive. Check to make sure everything is capitalized correctly.
Doesn't appear to be Downloading Code
- Check for logic errors within the specific function
- Check that you are actually modifying the correct file from the filepath.
- Ask one of the coaches