<< Back

Exercise 2.1 - Lights and Buttons

f) Sequence of colors

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

Press the RGB LED button (hardware) to change the LED's color in a sequence from white, yellow, green, blue, and red with every click of the button.


script.js

This is the JavaScript code behind the above application.