Browse Source

Added test Lua script demonstrating current features

master
Thomas Kolb 8 months ago
parent
commit
001af5f0f3
  1. 8
      test.lua

8
test.lua

@ -1,6 +1,8 @@
function init(nstrip, nmod)
print("Initializing with "..nstrip.." strips with "..nmod.." modules each.")
print("Sampling rate: "..CONFIG['sampling_rate'].." Hz")
local nled = nstrip * nmod
red = {}
@ -20,6 +22,10 @@ function init(nstrip, nmod)
end
function periodic()
print("Going round and round...")
bass = sigproc:get_energy_in_band(0, 400)
mid = sigproc:get_energy_in_band(400, 4000)
treble = sigproc:get_energy_in_band(4000, 20000)
print("Bass: "..bass.." – Mid: "..mid.." – Treble: "..treble)
return red, green, blue, white
end

Loading…
Cancel
Save