From: Nathaniel Wesley Filardo Date: Sat, 23 Sep 2017 19:58:05 +0000 (-0400) Subject: lamp-touch also directly writes to LED array X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=d0ea460c07ee2469315565d98e39c9a32098d685;p=acmetensortoys-esp-lua_lamp lamp-touch also directly writes to LED array As part of blackout logic. So it needs to bounce the enabling GPIO. --- diff --git a/lamp-touch.lua b/lamp-touch.lua index 684c968..5aac3f3 100644 --- a/lamp-touch.lua +++ b/lamp-touch.lua @@ -37,7 +37,9 @@ local clear0 = function(o) return bit.band(o,0xFE) end local function setblackout(nb) if nb then isblackout = true + gpio.write(3,gpio.HIGH) ws2812.write(string.char(0):rep(32*3)) + gpio.write(3,gpio.LOW) cap:mr(0x81,function(o) return bit.bor(o,0x03) end) -- breathe cap:mr(0x74,set0) -- drive cap:mr(0x72,clear0) -- unlink