|() button pressed?|
<( v) button pressed?::microbit>
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.
|Please expand this section. You can help by talk page. (April 2020)if you are an editor. More information might be found in a section of the|
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!] end
- Making a sprite move when the specified buttons are pressed
if <(A v) button pressed? :: microbit> then move (10) steps end if <(B v) button pressed? :: microbit> then move (-10) steps end
- micro:bit extension