blob: cad347f8ac01aa6a0ac7d3b532ce2541602634c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
.. highlight:: cpp
.. _lang-toggleled:
toggleLED()
===========
*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
--------
- :ref:`BOARD_LED_PIN <lang-board-values-led>`
- :ref:`togglePin() <lang-togglepin>`
|