diff options
Diffstat (limited to 'docs/source/lang/api/waitforbuttonpress.rst')
-rw-r--r-- | docs/source/lang/api/waitforbuttonpress.rst | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/docs/source/lang/api/waitforbuttonpress.rst b/docs/source/lang/api/waitforbuttonpress.rst deleted file mode 100644 index 0e0fbaf..0000000 --- a/docs/source/lang/api/waitforbuttonpress.rst +++ /dev/null @@ -1,43 +0,0 @@ -.. highlight:: cpp - -.. _lang-waitforbuttonpress: - -waitForButtonPress() -==================== - -Wait for the board's built-in button to be pressed, possibly with -timeout. The button is labeled "BUT" on the board's silkscreen. Its -pin number is the constant :ref:`BOARD_BUTTON_PIN -<lang-board-values-but>`. - -Library Documentation ---------------------- - -.. doxygenfunction:: waitForButtonPress - - -Example -------- - -.. _lang-waitforbuttonpress-example: - -This example sets up the board's button pin as an input, then prints a -message very time the button is pressed. - -:: - - void setup() { - pinMode(BOARD_BUTTON_PIN, INPUT); - } - - void loop() { - waitForButtonPress(); - SerialUSB.println("You pressed the button!"); - } - -See Also --------- - -- :ref:`Board-specific values <lang-board-values>` -- :ref:`BOARD_BUTTON_PIN <lang-board-values-but>` -- :ref:`lang-isbuttonpressed` |