Variable and Sensing Values Monitoring in VEXcode 123

Variable and sensor monitoring available in the VEXcode 123 Monitor Console provides important visual cues that allow the user to see what is happening in a VEXcode 123 project in real time. The Monitor Console allows users to make a visual connection between the project and the actions of the 123 Robot. Monitoring sensor and variable values in the Monitor Console allows the user to view real-time reports of a specific value (or multiple values) in a project.


How to Use the Monitor Console

Screenshot of VEXcode VR block tutorial interface, showcasing various programming blocks and options for users to create and manipulate code in VEX Robotics projects.

To open the Monitor Window and view the Monitor Console, select the Monitor icon next to the Help.

Diagram illustrating VEX Robotics components and their functions, used in Block Tutorials section of VEXcode VR Overview, highlighting key elements for understanding robotics programming.

The Monitor Console reports Sensor and Variable values.

Screenshot of VEXcode VR block tutorials interface, showcasing various programming blocks and their arrangement for VEX Robotics projects, illustrating the coding environment and tools available for users.

Blocks from the Sensing category in the Toolbox can be added to the Monitor Console. First, select the parameter to be monitored in the block within the Toolbox.

Next, select and drag the block to the Monitor Console icon in the Workspace.

Screenshot of VEXcode VR block tutorial interface, showcasing various programming blocks and options for VEX Robotics, illustrating the features available for users in the Block Tutorials section.

To remove sensor values from the Monitor Console, select the 'X' icon.

Variables in the Toolbox can be added to the Monitor Console by selecting and dragging the variable block to the Monitor Console icon in the Workspace. VEXcode 123 always begins with a 'myVariable' variable. For information about adding a new variable and variable naming in VEXcode 123, view this article.

Screenshot of VEXcode VR block tutorial interface, showcasing various programming blocks and options for creating robotics projects within the VEX Robotics environment.

To remove variables from the Monitor Console, select the 'X' icon.

Screenshot of VEXcode VR block tutorial interface, displaying various programming blocks and options for VEX Robotics projects, illustrating the features and layout of the software for educational purposes.

Lists can also be added to the Monitor Console. Before being added to the Monitor Console, lists and 2D lists must be created. This can be done by selecting ‘Make a List’ or ‘Make a 2D List’ from the Toolbox.

To add an existing list or 2D list, select and drag the associated list block to the Monitor Console icon in the Workspace.

If the incorrect block is dragged to the Monitor Console icon in the Workspace, a red icon will appear over it, signifying the wrong block was chosen and cannot be monitored.

Screenshot of VEXcode VR block tutorial interface, showcasing various programming blocks and their arrangement for creating a robotics project, part of the VEX Robotics overview.

To remove a list from the Monitor Console, select the 'X' icon.


Monitoring Sensor Values

Screenshot of a VEXcode VR block tutorial, showcasing various programming blocks and their arrangement for educational purposes in VEX Robotics.

Monitoring sensor values in the Monitor Console allows the user to view sensor data in real-time.

In the following example, the <Detects color> block is being monitored in the Monitor Console. The project directs the 123 Robot to drive until it detects an object. Once it detects an object, if that object is blue, the 123 Robot will turn right. If the 123 Robot does not detect blue, it will turn left. Watch as the value of the <Detects color> block in the Monitor Console changes from false to true when your 123 Robot detects the color blue.

Screenshot of a VEXcode VR block tutorial, showcasing various programming blocks and their functions, designed to help users understand the basics of coding with VEX Robotics in the context of Category 123.

The Monitor Console can also be used to help the user visualize the flow of the project by showing blocks that may not be explicitly reported, such as the timer value in seconds.

In the following example, the (Timer value) block is being reported in the Monitor Console. The 123 Robot will drive forward for 2 steps, and then wait until the (Timer value) block reports back a value greater than 5 seconds. The 123 Robot will then turn right 90 degrees. Without the Monitor Console, the user would be unable to visualize the exact timing of the 123 Robot turning right 90 degrees.


Monitoring Variable Values

Screenshot of VEXcode VR block tutorial interface, showcasing various programming blocks and their arrangement for creating robot commands in VEX Robotics. The image illustrates a user-friendly layout for beginners learning to code with VEXcode VR.

The Monitor Console can also be used to monitor variable values. The Monitor Console can provide real-time reports of a specific variable in a project.

In the following example, the ‘timesRepeated’ variable is used to monitor the number of times the 123 Robot repeats a certain behavior. The variable monitoring on the Monitor Console can help to provide real-time feedback to understand the flow of the project.

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

Last Updated: