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.
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() |
---|