diff options
Diffstat (limited to 'docs/source/lang/api/toggleled.rst')
-rw-r--r-- | docs/source/lang/api/toggleled.rst | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/docs/source/lang/api/toggleled.rst b/docs/source/lang/api/toggleled.rst index 54a7d64..cad347f 100644 --- a/docs/source/lang/api/toggleled.rst +++ b/docs/source/lang/api/toggleled.rst @@ -1,15 +1,35 @@ +.. highlight:: cpp + .. _lang-toggleled: toggleLED() =========== -Switches the LED from off to on, or on to off. +*Toggle* the built-in LED: switch it from off to on, or on to off. Library Documentation --------------------- .. doxygenfunction:: toggleLED +Example +------- + +.. _lang-toggleled-example: + +This example sets up the board's LED pin for output, then toggles the +LED every 100 milliseconds:: + + void setup() { + pinMode(BOARD_LED_PIN, OUTPUT); + } + + void loop() { + toggleLED(); + delay(100); + } + + See Also -------- |