I only get a couple nights a week to play with this stuff, but will take a closercloser look at the next opportunity.
I only get a couple nights a week to play with this stuff, but will take a closercloser look at the next opportunity.
Explore... Chat... Share...
self.data = self.data_spi
local oled = flashMod("oled")
local oled = dofile("oled.lc")
function oled:funcName(...)
function oled.funcName(self, ...)
oled:funcName(...)
oled.funcName(oled, ...)
mod = { MOD_NAME = "led" }
mod.values = {0,0,0}
mod.desired = {0,0,0}
function mod.adjust()
local change = false
for i = 1, 3 do
if mod.values[i] < mod.desired[i] then
mod.values[i] = mod.values[i] + 1
change = true
elseif mod.values[i] > mod.desired[i] then
mod.values[i] = mod.values[i] - 1
change = true
end
end
if change then
ws2812.write(8, string.char(mod.values[2], mod.values[1], mod.values[3]):rep(10))
end
end
function led.DesiredHex()
return string.format("%02X%02X%02X", mod.desired[1], mod.desired[2], mod.desired[3])
end
function led.CurrentHex()
return string.format("%02X%02X%02X", mod.values[1], mod.values[2], mod.values[3])
end
flashMod(mod)
return mod
l = flashMod("led")
print(l.CurrentHex())
led.lua:28: attempt to index field 'values' (a nil value)
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]