() button pressed?
<( v) button pressed?::microbit>
Category micro:bit
Type Boolean

The () button pressed? block is a Boolean block used as part of the micro:bit extension. This block will detect if the micro:bit has a certain button pressed. By default, the block checks for the A button being pressed.

Example Uses

This block reports whether a button on the micro:bit is pressed, so it has many uses.

  • Reporting whenever a specific button is pressed
if <(A v) button pressed? :: microbit> then
 say [Button pressed!]