ledMatrix.lua
local gainer = require 'gainer'
local board = gainer.new()
local checkerboardA = {
0x0F0F0F0F,
0xF0F0F0F0,
0x0F0F0F0F,
0xF0F0F0F0,
0x0F0F0F0F,
0xF0F0F0F0,
0x0F0F0F0F,
0xF0F0F0F0
}
local checkerboardB = {
0xF0F0F0F0,
0x0F0F0F0F,
0xF0F0F0F0,
0x0F0F0F0F,
0xF0F0F0F0,
0x0F0F0F0F,
0xF0F0F0F0,
0x0F0F0F0F
}
local function setup()
board:init(nil, 7)
end
local function loop()
board:setMatrix(checkerboardA)
board:wait(1)
for i, value in ipairs(checkerboardB) do
board:analogWrite(gainer.SINGLE, i, value)
end
board:wait(1)
end
board:start(setup, loop)