Secuencia de LEDs

Este código genera una secuencia con el circulo de LEDs:

var foo[8]
var i
var c = 0

onevent prox
c = (c + 1) % 8
foo[c] = 31
for i in 0:7 do
    if foo[i] >= 6 then
        foo[i] = foo[i] - 6
    else
        foo[i] = 0
    end
end
call leds.circle(foo[0], foo[1], foo[2], foo[3], foo[4], foo[5], foo[6], foo[7])
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License