This article is an overview of the VEX Visual Studio Code Extension UI(User Interface). The extension supports the development of C++ and Python projects for VEX IQ 2nd Generation, EXP, and V5 platforms.

image48.png

UI Components

There are 3 major components to the VEX VS Code Extension.

  1. Toolbar
  2. Activity Bar and Side Bar
  3. Terminal Panel

Toolbar

The toolbar gives users a quick way to interact with VEX VS Code extension projects VEX Brains, and VEX Controllers. The toolbar is only active when a valid VEX project is open in VS Code. A valid VEX project is a project that is created or imported by the extension. Opening a VEXcode or VEXcode Pro project is not valid and will need to be imported.

image2.png

Device Picker

image60.png

The device picker has two main functions. First, it displays a brain or controller icon representing the connected VEX Device type.

image41.png

Second, when the device list icon is clicked, a quick pick list appears with all of the connected VEX Devices. The user can select which device the extension will connect to.
The current connected device will always appear at the top of the list followed by all other devices sorted by device type(Brain or Controller) and platform(IQ 2nd Generation, EXP, and V5).

image4.png

Each device item contains the Brain Name, Platform, Device type and device path information.

image8.png

image56.png

Important

If a controller is connected to a computer, but does not have a radio link to a brain, no brain name will be displayed next to the list item or device list status bar icon.

Slot Selector

image19.png

The slot selector icon allows the user to pick which slot the extension will download or play a user program on.

image43.png

When the slot selector icon is clicked, a quick pick list appears with the available user program slots 1-8.

Build/Download

image5.pngimage6.png

The Build/Download icon changes functions if a VEX Brain or a VEX Controller is connected.

image5.png

If a VEX Device is not connected then the build icon is shown. When clicked, the project will only build.

image6.png

If a VEX Device is connected, then the download icon is shown. When clicked, the project will build and if successful, will be downloaded to the VEX Device.

Play

image33.png

The play icon, when clicked, runs the user program in the selected slot.

Stop

image45.png

The stop icon, when clicked, stops a user program.

Selected Workspace

image24.png

VS Code supports multi workspace projects. The project selector allows users to switch between VEX projects when multiple exist inside the workspace.

image14.png

When the project selector icon is clicked, a quick pick list appears with all valid projects.

Important
If a project is not valid, it will not be shown in the project quick pick list. A project is not valid unless it has been created or imported by the VEX VS Code Extension.

image34.png

Python File Selector(Python Only)
When a VEX python project is selected the python file selector will appear in the toolbar. Python for VEX only supports single file downloads currently.

image17.png


When the icon is clicked, a quick pick list appears with all python files located in the workspace directory.
The python file selector allows the user to switch between python source files(.py)

VEX Activity Bar and Sidebar

image57.png

Projects Actions

image47.png

The vex activity bar contains the Project Actions view and the VEX Device Info view.

The Project actions view is used for creating a new project or importing an existing VEXcode or VEXcode Pro Project.

For more information about creating a new project, check out this article!

Version information is also displayed in the bottom left and right hand corners of the view.

Important
If a VEXcode or VEXcode Pro project is open in the editor then it will not be considered a valid VEX Project, the project needs to be imported using the Import button in the VEX sidebar.

VEX Device Info

image37.pngimage62.png

The VEX Device Info view gives the user an overview of the connected VEX Brain or VEX Controller. VEXos Version, serial port path, user program, and device information can all be found in this view. Other functions such as VEXos firmware updates, screen shots, setting brain name and settings team number can also be performed through this view as well.

System Information

image25.png

The system information provides a brief overview of a connected VEX Device. This includes a device’s VEXos version, Brain name, team number, Brain ID, and python runtime version information.

Serial Port Information

image7.png

Serial Port information displays the device path for each port available for a VEX Device. Most VEX Devices enumerate as two serial ports. The Communication serial port is used to download programs and control the brain functions. The User serial port is used to transfer data between the user app running on the Brain and the host computer connected via USB. The V5 Controller is the only VEX device that has just a Communication serial port and no User serial port.

Programs Information

image12.png

Program information displays a list of all downloaded user programs on a VEX Brain.

image23.png

Each program list item can be expanded to show additional information about each user program, such as slot location, filename, language type, filesize, and time of download.

Devices Information

image20.png

Devices information shows a list of all smart port devices connected to a VEX Brain. Each list item shows the smart port number and device type.

image29.png

Each Device list item can be expanded to show firmware version information about each smart port device.

Controller linked status is displayed when connected to VEX Brain Device.

image44.png

VEX Brain is linked to a VEX Controller

image10.png

VEX Brain is not linked to a VEX Controller

image52.png

VEX V5 Controller is tethered to a VEX V5 Brain

Screen Shots

image50.png

By clicking on the Camera icon, a user can take and download a screenshot from a VEX Brain.
Screen shots are only available when connected directly to a VEX Brain via USB

Battery Medic (V5 Brain Only)

image39.png

By clicking on the Heart icon, the extension will download and run the battery medic user program.

Set Brain Name

image28.png

By clicking on the Pencil icon next to system->name , a user can set the name for a VEX Brain.

image54.png

After the Pencil icon is clicked, an input box will appear at the top of the VS Code editor. Type the new brain name in the input box and press enter to set.

Set Team Number

image58.png

By clicking on the Pencil icon next to system->team , a user can set the team number for a VEX Brain.

image49.png

After the Pencil icon is clicked then an input box will appear at the top of the VS Code editor. Type the new team number in the input box and press enter to set.

Erase User Program

image30.png

By clicking on the Trashcan icon next to programs->project name, a user can erase a program in a specific slot. IMPORTANT, once you erase a program it can not be recovered. Please use caution when using this feature.

Device Info Warnings

VEXos Update

image22.png

When a VEX Brain’s VEXos version is out of date, a warning message icon appears next to the VEXos version and both Brain icons turn yellow.

To resolve this warning a user should update VEXos for their VEXos Brain.

image31.png

VEXos can be updated by clicking the up arrow next to the VEX Brain Icon.

image36.png

Also a notification box will appear in the bottom right corner of the VS Code editor when VEXos is out of date. A user can start a VEXos update by clicking the “Update” button or click the “Ignore” button to skip the VEXos update.

Brain not linked to connected Controller

image21.png

The VEX Controller icon will turn yellow when a VEX Controller is connected to a computer, but is not linked to a VEX Brain.

To resolve this warning a user should link a VEX Controller to a VEX Brain

Terminal Panel

The VEX VS Code Extension provides two terminals on startup, the Log Terminal and the Interactive Terminal

image11.png

Log Terminal

image13.png

The Log Terminal displays build output, build error, and download results.

Interactive Terminal

image16.png

The Interactive Terminal has two functions, displaying printf logs and sending raw keystrokes back to a user program. In order to take advantage of the Interactive terminal a Brain or Controller must be connected to a computer running the VEX VS Code Extension. Interactive terminal output gets cleared by default after building and downloading a user program.

User Settings

User settings are global settings settings that visual studio code offers for each extension. User settings are applied to every VEX VS Code extension project.

image32.png

How to access VEX user settings

image42.png

Click the gear in the left hand corner of VS Code and a context menu will appear

image27.png

In the context menu, click the “Settings” item and a settings page will appear.

image9.png

In the left hand list view, click on the “Extensions” item. Next, scroll down to the bottom and find the item labeled “VEX”.

image18.png

Click on the “VEX” list item.

image46.png

The VEX User settings will appear in the right hand panel.

Settings Overview

Controller Channel (V5 Controller only)

The Controller Channel setting controls the radio communication channel type between a V5 Brain and V5 Controller.
This setting only applies when VS Code is connected to a V5 Controller via USB and the controller is connected to a V5 Brain via VEXnet. The user can pick between Download and Pit channels. When set to Download, the radio will jump to a download VEXnet channel once a user program download is initiated. The download channel allows for higher data rates and more efficient downloads. When set to Pit, the radio will remain on a pit channel and the download will take much longer. By default this setting is set to Download.

image63.png

Cpp Project SDK Home

DO NOT EDIT THIS SETTING.

image1.png

Cpp Toolchain Path

Cpp Toolchain Path sets the Path for the toolchain that is used when building a C++ VEX VS Code project.

image3.png

Enable User Terminal

The Enable User Terminal setting allows the extension to open the user serial port when a VEX Brain or VEX Controller is detected by the extension. The only exception applies to a V5 Controller which does not enumerate with a user serial port.

image61.png

Enable allows the extension to connect to a userport on startup and will create the Interactive Terminal. If enable is selected while the extension is running, the extension will try to open the userport if a device is connected.
Disable prevents the extension from connecting to the user port on startup and won’t create an Interactive Terminal. If disable is selected while the extension is running, the extension will close the user port and remove the Interactive Terminal.

Project Build Type

Project Build Type sets how the extension will build a C++ project. The user can set the build type to Build or Rebuild.
Build only build the project when Make detects any changes in the project’s source code.
Rebuild cleans the project’s build directory, then builds the project. This option is normally much slower.

image51.png

Project Home

Project Home sets the default home directory for a new project when completing the New Project wizard.

image38.png

Run After Download

Run After Download when enabled, causes the user program to run after it is downloaded to a VEX Brain.

image53.png

Python SDK Home

DO NOT EDIT THIS SETTING.

image59.png

VEX Command Help

VEX Command Help allows access to documentation for specific functions included in the C++ and Python API (Application Programming Interface). Documentation is specific to each VEX Platform(IQ 2nd Generation, EXP, V5).

image55.png

To access VEX Command Help, first highlight the text of the function to search for.

image15.png

Right Click on the selected text, and a context menu will appear.
Next Click on the VEX Command Help to access documentation.

image35.png

If VEX Command Help finds an exact match, a new webview will appear with relevant documentation.

image26.png

If multiple documents match the selected text, then a drop down will appear with a filtered list of relevant documentation.

For more information, help, and tips, check out the many resources at VEX Professional Development Plus

Last Updated: