led.off()

Category:Circuit

Turns the red LED off.

Use led.on to turn the red LED back on.

Examples

onBoardEvent("buttonR", "down", function(event) {
  led.off();
});

Toggle Switch Light Switch

onBoardEvent("toggleSwitch", "open", function(event) {
  led.on();
});
onBoardEvent("toggleSwitch", "closed", function(event) {
  led.off();
});

Syntax

led.off()

Found a bug in the documentation? Let us know at documentation@code.org