Sensing#

To put a sensor in the Monitor Console, drag and drop its block to the Monitor Icon on the right side of the screen.

Animation showing how to drag and drop a sensor block to the Monitor Icon in the Monitor Console.

Timer#

Reset timer#

The Reset timer block is used to reset the Brain’s timer.

Timer block used to reset the Brain's timer to 0 seconds in a VR Robot programming context.

The Brain’s timer begins at the beginning of each project. The reset timer block is used to reset the timer back to 0 seconds.

In this example, the VR Robot will drive forward for 3 seconds before the Brain’s timer is reset and the Drivetrain stops.

Diagram showing the Timer Reset block used to reset the Brain's timer to 0 seconds in a VR Robot programming context.

Timer value#

The Timer value block is used to report the value of the Brain’s timer in seconds.

Timer block used to reset the Brain's timer to 0 seconds in a VR Robot programming context.

The Brain’s timer starts at 0 seconds when the program starts and reports the timer’s value as a decimal value.

The Timer value reporter block is used inside of blocks with circular spaces.

In this example, the VR Robot will wait for 3 seconds before printing the current timer value in the Print Console.

Diagram showing the Timer Reset block used to reset the Brain's timer to 0 seconds in a VR Robot programming context.

Drivetrain#

Drive is done#

The Drive is done block is used to report if the Drivetrain has completed its movement.

Image of a block labeled Drive is done" indicating the completion of the Drivetrain's movement in a coding environment.

The Drive is done block reports True when the Drivetrain’s motors have completed their movement.

The Drive is done block reports False when the Drivetrain’s motors are still moving.

The Drive is done block is used in blocks with hexagonal (six-sided) spaces.

In this example, the Drivetrain will drive forward for 50 inches. One second after the VR Robot has started moving, the code will begin to check if the Drivetrain has stopped. Once it is done moving, it will print its message to the Print Console.

Image showing a VR Robot's Drivetrain movement completion in the Monitor Console with timer and sensor blocks.

Drive is moving#

The Drive is moving block is used to report if the Drivetrain is currently moving.

Image showing the process of dragging and dropping a sensor block to the Monitor Icon in a programming interface.

The Drive is moving block reports True when the Drivetrain’s motors are moving.

The Drive is moving block reports False when the Drivetrain’s motors are stopped.

The Drive is moving block is used in blocks with hexagonal (six-sided) spaces.

In this example, the VR Robot will move forward for 50 inches. After 1 second, if the Drivetrain is still in motion, it will print a message to the Print Console.

Diagram illustrating how to drag and drop a sensor block to the Monitor Icon in the Monitor Console.

Drive heading#

The Drive heading block is used to report the heading that the Drivetrain is facing by using the Gyroscopic (Gyro) sensor’s current angular position.

Image showing the Drive Heading block used to report the Drivetrain's current heading in degrees.

The Drive heading reporter block reports a range from 0.00 to 359.99 degrees.

The Drive heading reporter block is used inside of blocks with circular spaces.

In this example, the VR Robot’s current drive heading will be printed to the Print Console.

Diagram showing how to use the Drive heading block in the Monitor Console for VR Robot programming.

Drive rotation#

The Drive rotation block is used to report the Drivetrain’s angle of rotation.

Diagram illustrating the Drive Rotation block used in VR Robot programming for reporting angle of rotation.

The Drive rotation reporter block reports a positive value when the Drivetrain turns in a clockwise direction.

The Drive rotation reporter block reports a negative value when the Drivetrain turns in a counter-clockwise direction.

The Drive rotation reporter block is used inside of blocks with circular spaces.

In this example, the VR Robot’s current angle of rotation will be printed to the Print Console.

Diagram illustrating the process of driving and rotating a VR Robot using sensor blocks in the Monitor Console.

Bumper Sensor#

To identify which Bumper Sensors your VR Robot can utilize, please consult your Playground’s detail page.

Pressed bumper#

The Pressed bumper block is used to report if the Bumper Switch is pressed.

Pressed bumper block used in coding to check if the Bumper Sensor is currently pressed in a VR Robot program.

The Pressed bumper block reports True if the Bumper Switch is being pressed.

The Pressed bumper block reports False if the Bumper Switch is not pressed.

Choose which Bumper Switch to use.

Image of the Pressed Bumper block used to check if the Bumper Switch is currently pressed in a robotics programming context.

The Pressing bumper Boolean block is used in blocks with hexagonal (six-sided) spaces.

In this example, the VR Robot will drive forward as it continuously checks if its Right Bumper Sensor has been pressed. If the sensor is pressed, the Drivetrain will stop.

Bumper sensor block illustrating the pressed state in a VR programming environment for robotics.

Distance Sensor#

To identify which Distance Sensors your VR Robot can utilize, please consult your Playground’s detail page.

Distance found object#

The distance found object block is used to report whether the built-in Distance sensor has found an object in front of the robot.

Image showing a block labeled Distance found object" for VR Robot programming in the Monitor Console.

Choose which Distance Sensor to use.

The base VR Robot only has access to the Front Distance sensor.

Image showing the Distance Sensor block in the Monitor Console for detecting objects and measuring distance.

The VR+ Robot has access to the Front, Left, and Right Distance sensors.

Image showing the Distance found object" block used in a VR robot programming context.

The Distance found object block reports True when the built-in Distance sensor sees an object or surface within its field of view, and within 3000 mm of the sensor.

The Distance found object block reports False when the built-in Distance sensor does not detect an object or surface within 3000 mm.

The Distance found object block is used in blocks with hexagonal (six-sided) spaces.

In this example, the VR Robot will turn right indefinitely until the Front Eye Sensor detects an object. When it detects an object, it will stop turning and print the distance between the sensor and the object in millimeters.

Diagram illustrating the distance measurement from a sensor to an object in a VR robot context.

Distance from#

The distance from block is used to report the distance of the nearest object.

Diagram illustrating the distance measurement from the Distance Sensor to an object detected by the VR Robot.

Choose which Distance Sensor to use.

The base VR Robot only has access to the Front Distance sensor.

Diagram showing the distance measurement from the front distance sensor to an object in the Monitor Console.

The VR+ Robot has access to the Front, Left, and Right Distance sensors.

Diagram showing the distance measurement from the Distance Sensor to the nearest detected object in a VR Robot.

Choose whether the Distance from block reports in millimeters or inches.

Diagram illustrating distance measurement from sensors in a VR Robot's Monitor Console setup.

The Distance from block is used inside blocks with circular spaces.

In this example, the VR Robot will turn right indefinitely until the Front Eye Sensor detects an object. When it detects an object, it will stop turning and print the distance between the sensor and the object in millimeters.

Diagram illustrating the distance measurement from a sensor to an object in a VR robot context.

Eye Sensor#

To identify which Eye Sensors your VR Robot can utilize, please consult your Playground’s detail page.

Eye Sensor near object#

The Eye Sensor near object block is used to report if the Color Sensor Eye is close enough to an object to detect a color.

Eye Sensor detecting an object, indicating proximity for color detection in a VR Robot programming context.

Choose which Eye Sensor to use.

Eye Sensor detecting an object nearby, used for color detection in robot programming.

The Eye Sensor near object block reports True when the Color Sensor is close to an object that has detectable colors.

The Eye Sensor near object block reports False when the Color Sensor isn’t close enough to an object with detectable colors.

The Eye Sensor near object block is used in blocks with hexagonal (six-sided) spaces.

In this example, the VR Robot will drive forward until the Front Eye Sensor is close enough to the object to detect a color, then the Drivetrain will stop.

Eye Sensor detecting a nearby object in a robotics programming environment.

Eye Sensor detects color#

The Eye Sensor detects color block is used to report if one of the Color Sensor Eyes detects a specified color.

Image showing color detection capabilities of the Eye Sensor in a VR robot programming context.

Choose which Eye Sensor to use.

Image showing the Eye Color Selector interface for the VR Robot's color detection capabilities.

Choose which color to detect.

Color detection interface for Eye Sensor, showing color options and brightness levels in a programming environment.

The Eye Sensor detects color block reports True when the Color Sensor Eye detects the selected color.

The Eye Sensor detects color block reports False when the Color Sensor Eye detects a different color than the one selected.

The Eye Sensor detects color block is used in blocks with hexagonal (six-sided) spaces.

In this example, the VR Robot will drive forward until the Front Eye Sensor detects a green object. When the Front Eye Sensor detects a green object, the VR Robot will turn right for 90 degrees.

Image showing an example of different eye colors detected by a sensor in a robotics context.

Color brightness#

The Color brightness block is used to report the brightness of an object from one of the Color Sensor Eyes.

Color brightness block used to report the brightness of an object detected by the Color Sensor Eye.

The Color brightness block reports the brightness of an object. White objects will report a brightness of 100%, black objects will report a brightness of 0%. All other colors will report a brightness between those values.

Choose which Eye Sensor to use.

Color brightness block interface showing brightness readings from Color Sensor Eyes for object detection.

The Color brightness block is used in blocks with circular spaces.

In this example, the VR Robot will drive forward until the Front Eye Sensor is close enough to detect the color of the object, then it will stop and print the object’s current brightness.

Image showing a color brightness example with a color sensor reporting brightness levels from different colored objects.

Location Sensor#

Position#

The Position block is used to report the X or Y coordinate position of the VR Robot.

Diagram illustrating the Position block used to report the VR Robot's X or Y coordinates in a programming environment.

Choose whether to return the X coordinate or Y coordinate.

Image showing the process of selecting a sensor block for the Monitor Console in a VR programming environment.

Choose whether the value is reported in mm or inches.

Diagram illustrating position units for VR Robot sensors and their coordinate reporting functionalities.

The Position block is used in blocks with circular spaces.

In this example, the VR Robot’s current Y position in millimeters will be printed to the Print Console.

Diagram showing how to drag and drop sensor blocks into the Monitor Console for programming the VR Robot.

Position angle#

The Position angle block is used to report the angle of the VR Robot in degrees.

Image showing the Position angle block used to report the VR Robot's angle in degrees in a programming interface.

The Position angle block is used in blocks with circular spaces.

In this example, the VR Robot’s current angle in degrees will be printed to the Print Console.

Diagram illustrating the Position angle block for reporting the VR Robot's angle in degrees.