aboutsummaryrefslogtreecommitdiffstats
path: root/docs/source/lang/api/toggleled.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/source/lang/api/toggleled.rst')
-rw-r--r--docs/source/lang/api/toggleled.rst37
1 files changed, 37 insertions, 0 deletions
diff --git a/docs/source/lang/api/toggleled.rst b/docs/source/lang/api/toggleled.rst
new file mode 100644
index 0000000..cad347f
--- /dev/null
+++ b/docs/source/lang/api/toggleled.rst
@@ -0,0 +1,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>`