Button#
Introduction#
The VEX 123 Robot features four buttons that can detect whenever they are pressed.
Below is a list of available blocks:
pressed? – Returns a Boolean indicating whether or not a button was pressed.
pressed?#
The pressed? returns a Boolean indicating whether or not a specified button was pressed.
True - The button is being pressed.
False - The button is not being pressed.
<[ifbuttonleft v] pressed?>
Parameters |
Description |
|---|---|
button |
The button to detect presses from:
|
Example
when started
[Drive after the sound button is pressed.]
wait until <[soundIcon v] pressed?>
drive [forward v]