- This article is about the micro:bit Extension block. For the EV3 Extension block, see Button () Pressed? (block).
|() Button Pressed?|
( v) button pressed?
The () Button Pressed? block is a boolean block and a micro:bit block. Its options are "A", "B", and "any". The block returns whether or not the specified button is being pressed on the micro:bit unit.
- Displaying when a specific button is pressed
if <(any v) button pressed?> then say [Button pressed!] end
- Movement based on pressing certain buttons
if <(A v) button pressed?> then move (10) steps end if <(B v) button pressed?> then move (-10) steps end
The Wiki is working on a dark theme, and you're seeing it! Got feedback? Post on the Wiki Forum Topic.