rust_musiclight/test.lua
Thomas Kolb 62bbff481c Lua support: add script handling class with basic I/O
The relevant functions are called and the return types and sizes
verified. The API for the user is not implemented yet.
2021-02-19 23:29:52 +01:00

26 lines
379 B
Lua

function init(nstrip, nmod)
print("Initializing with "..nstrip.." strips with "..nmod.." modules each.")
local nled = nstrip * nmod
red = {}
green = {}
blue = {}
white = {}
for i = 1,nled do
red[i] = 0.8
green[i] = 0.1
blue[i] = 0.2
white[i] = 0.1
end
return 0
end
function periodic()
print("Going round and round...")
return red, green, blue, white
end