Robot#
Introduction#
Robot blocks allow you to check important details about the VEX AIM Coding Robot, including its name and battery percentage.
Below is a list of available blocks:
battery level – Returns the robot’s current battery percentage.
robot name – Returns the robot’s set name as a string.
battery level#
The battery level block returns the robot’s battery level as a percentage. This returns a number from 0 to 100.
The battery level in percent reporter block.#
(battery level in %)
Parameters |
Description |
---|---|
This block has no parameters. |
A stack of blocks that begins with a when started block, followed by a comment block reading Get the battery level and display it. A print block then displays the battery level percentage on the screen.#
when started
[Display the robot's current battery.]
print (battery level in %) on screen ▶
robot name#
The robot name block returns the robot’s set name as a string.
The get name reporter block.#
(robot name)
Parameters |
Description |
---|---|
This block has no parameters. |
A stack of blocks that begins with a when started block, followed by a comment block reading Get the battery level and display it. A print block then displays the battery level percentage on the screen.#
when started
[Display the robot's set name.]
print (robot name) on screen ▶