Turns the red LED on.
Using led.on()
will keep the red LED next to the USB on continuously. To turn it off, use led.off()
onBoardEvent("buttonL", "down", function(event) { led.on(); });
onBoardEvent("toggleSwitch", "open", function(event) { led.on(); }); onBoardEvent("toggleSwitch", "closed", function(event) { led.off(); });
led.on()
Found a bug in the documentation? Let us know at documentation@code.org