监控#
可以使用监视控制台监视 VEXcode 中的传感器和变量的值。

默认情况下,6 轴臂的 x、y 和 z 位置在监控控制台中报告,但您可以使用以下两个命令添加其他传感器和变量:
监控传感器()#
The monitor_sensor(sensor1, sensor2, sensor3, …) method adds a recognized sensor to the Monitor Console.
Recognized sensor identifiers for the sensor parameter are:
brain.timer_timearm.is_donearm.get_xarm.get_yarm.get_zarm.get_pitcharm.get_rollarm.get_yaw
When adding sensor identifiers with the monitor_sensor() method, they have to be added as strings - therefore enclosed with quotation marks:
monitor_sensor("arm.get_roll")
Multiple sensor identifiers, separated by commas, can be added to the monitor_sensor() method:
monitor_sensor("arm.get_x", "arm.get_y", "arm.get_z")
**返回:**无。
监控变量#
The monitor_variable(variable1, variable2, variable3, …) method adds a previously defined variable to the Monitor Console.
When adding sensor identifiers with the monitor_sensor() method, they have to be added as strings - therefore enclosed with quotation marks:
# Create a global variable "cube_count" and set the
# variable to 0.
disk_count = 0
# In the main function, add the cube_count variable to
# the Monitor Console.
def main():
monitor_variable("disk_count")