A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://docs.leaflabs.com/static.leaflabs.com/pub/leaflabs/maple-docs/latest/lang/api/toggleled.html below:

toggleLED() — Maple v0.0.12 Documentation

toggleLED()¶

Toggle the built-in LED: switch it from off to on, or on to off.

Library Documentation¶

Toggle the LED.

If the LED is on, turn it off. If it is off, turn it on.

The LED must its mode set to OUTPUT. This can be accomplished portably over all LeafLabs boards by calling pinMode(BOARD_LED_PIN, OUTPUT) before calling this function.

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);
}

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4