Brain Sensing#
Introduction#
The Brain Sensing category includes blocks that detect input from the VEX IQ (2nd gen) Brain and report internal system values. These blocks allow your project to respond to button presses, monitor battery status, and determine the current screen cursor position when printing.
These blocks are often used in tandem with visual feedback tools such as the Screen or Console blocks, helping create interactive or responsive programs during runtime.
Below is a list of available blocks:
brain button pressed? – Returns a Boolean indicating whether a specific Brain button is currently pressed.
battery capacity – Returns the current battery level as a percentage.
when Brain button – Executes the attached stack of blocks when a Brain button is pressed or released.
battery capacity#
The battery capacity block returns the battery charge level as a percentage. This returns a number from 0 to 100.
(battery capacity in %)
Parameters |
Description |
---|---|
This block has no parameters. |
Example
when started :: hat events
[Display the current battery capacity.]
print (battery capacity in %) on screen ◀ and set cursor to next row