These blocks work for EV3 Robot!
The EV3 brick has 6 different buttons (Up, Down, Left, Right, Enter, Escape) which are used for:
- Navigation within the brick's menu - while no program is running
- As touch sensors, while a program is running
In CoderZ we have three blocks related to Buttons, located in the Sensors category. These blocks are only relevant for when using a real robot.
This block pauses the progress of the program until any of the six buttons is pressed. It is useful to place this block at the beginning of a program so you can start the program by pressing any button.
This block pauses the progress of the program until a specific button (Choose using the Enter dropdown) is either pressed, or pressed and released (Choose using the waitForPress dropdown).
This block returns a boolean value (TRUE or FALSE), depending on the button state; pressed or released. You can use it as a condition for Loops and Ifs.