button 1 |
---|
onEvent("button1", "click", function(event) { flashRed(); });
function flashRed() { for(var i=0;i<=10;i+=2){ colorLeds[i].color("red"); colorLeds[i+1].color("black"); } }
button 2 |
---|
onEvent("button2", "click", function(event) { betterBlue(10); });
function betterBlue(j) { for(var i=0;i<=10;i++){ colorLeds[i].color("blue"); colorLeds[i].intensity(j); } }