diff --git a/test.lua b/test.lua index c486336..1de3880 100644 --- a/test.lua +++ b/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