isButtonPressed() — Maple v0.0.12 Documentation

### Navigation

- next
- previous |
- LeafLabs |
- Index »
- Complete Language Index »

# isButtonPressed()

Check whether the board’s built-in button (labeled BUT on the silkscreen) is pressed. The pin number of the built-in button is given by the constant `BOARD_BUTTON_PIN`.

## Library Documentation

uint8 isButtonPressed()

  If the button is currently pressed, waits until the button is no longer being pressed, and returns true.

  Otherwise, returns false.

  The button pin must have its mode set to INPUT. This can be accomplished portably over all LeafLabs boards by calling pinMode(BOARD_BUTTON_PIN, INPUT).

  See: | pinMode()

## See Also

- Board-specific values
- BOARD_BUTTON_PIN
- waitForButtonPress()

### Navigation

- next
- previous |
- LeafLabs |
- Index »
- Complete Language Index »