<< Back

Exercise 2.1 - Lights and Buttons

e) Hardware button toggles the LED

This is the console. All output created with writeLog() is shown here.

Press the RGB LED button (hardware) to make the LED blue. Press it again to turn it off.


script.js

This is the JavaScript code behind the above application.