Using the Console in VEXcode AIR

The Console allows the user to display messages, report sensor values, or to present data from VEXcode AIR projects. The Console also allows users to input values or commands to the VEX AIR Drone Controller and save the outputs as a text file.

The Console can also be used to display process information, providing visual cues that enable the user to see what is happening in a VEXcode AIR project at a specific moment in time, thereby making a visual connection between the project and the actions of the drone.


Connecting to the Console Serial Port in Web-Based VEXcode AIR

To print to the Console in web-based VEXcode AIR, a connection to the Console Serial Port is needed. This second port is needed because the first serial port links the controller to the device for project downloads from a browser. If you are using app-based VEXcode AIR, skip to the How to Open the Console section.

Note: To print to the Console, the controller must stay connected to the device via a USB cable while using the Console Serial Port.

The Console window with the message: Console Serial Port is not connected - please connect to the Console Serial Port to Enable the Console shown. A Learn More button is underneath.

If the Console Serial Port is not connected, the Console in VEXcode AIR will show as unavailable.

The Drone menu in VEXcode shows a green robot icon, and is open with the Connect Console Serial Port button on the bottom highlighted.

Ensure the controller is connected to the device via the first web-serial port. For more information on this connection process, view the article Connecting the VEX AIR Drone Controller to VEXcode AIR.

Select Connect Console Serial Port.

macOS/Chromebook

A browser prompt appears stating that the browser is about to connect to the VEX AIR Controller’s Console Serial Port via USB. It instructs the user to select VEX Robotics AIR Controller with the highest number and press connect. The Continue button is highlighted.

Windows

The Windows connection prompt reads "Your browser is about to connect to your VEX AIR Controller's Console Serial Port via USB. Select 'VEX Robotics User Port' and press connect. The Continue button in the lower right corner is highlighted.

Select each image above to enlarge.

A prompt will appear based on your device. Select Continue.

macOS/Chromebook

The connection window shows two devices labeled VEX Robotics AIR Controller. The unpaired device with the higher number, cu.usbmodem01483, is selected. The Connect button is highlighted.

Windows

The connection window shows two options: VEX Robotics User Port (COM84) and VEX Robotics Communications Port (COM85) - Paired. The User Port is selected, and the Connect button is highlighted.

Select each image above to enlarge.

  • macOS/Chromebook: Select the AIR Controller with the HIGHEST ID number from the list. The lowest ID number will already be paired. 
    Select Connect once your choice is highlighted.
  • Windows: Select User Port. The Communications Port will already be paired.
    Select Connect once your choice is highlighted.
The Controller status panel shows Console Serial Port connected under the VEX AIR controller information. Other statuses show USB Connection connected, VEXos 1.0.0, and Firmware Status up to date.

Once the connection is successful, the Console Serial Port will display as Connected. The Console will now be available for use.


How to Open the Console

The Monitor window shows the toolbar with several icons, and the Console button represented by a Monitor symbol is highlighted.

The Console is located in the Monitor Console in VEXcode AIR. To open the Console, select the Monitor Console icon next to Help.

The Console window is open with a blank text area. Below it are buttons labeled Clear, Save, Copy to Clipboard, and Send. The input box reads Send to Controller.

The Console will open once selected.


Using the Console

Sending Information to the Controller

The Console window shows a blank text area with the input box labeled Send to Controller. The Send button is on the right.

When using the Console in a project, you have the ability to send information to the controller. Select the Send to Controller text box and type your chosen input.

The Console window shows the same layout with the input box labeled Send to Controller. The Send button is highlighted.

When your message is complete, select the Send button or press the Return / Enter key on your keyboard.

The Console window shows a conversation log.

The Send to Controller function can be used in many ways, such as sending strings from the Console to the controller to adjust how a project runs, or to trigger specific behaviors.

Learn more about how to use the Console in a VEXcode AIR project in the VEXcode API Reference - AIR.

Save or Copy from the Console

The Console window displays the same message exchange between VEX and AIR. The Save button beneath the Console is highlighted.

It is easy to save information from the Console onto your device. Select SAVE on the bottom of the Console to save all text as a .txt file.

The Console window displays the message exchange between VEX and AIR. The Copy to Clipboard button beneath the Console is highlighted.

You also can select the COPY TO CLIPBOARD option to save the Console information to your clipboard then paste into another type of file. 

Clear the Screen in the Console

The Console window displays the message exchange between VEX and AIR. The Clear button beneath the Console is highlighted.

You can clear the entire Console by selecting the CLEAR button. 

You can also clear a single row or the entire Console by using Blocks or Python commands. To learn more, visit the VEXcode API Reference - AIR.

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

Last Updated: