From d0ea460c07ee2469315565d98e39c9a32098d685 Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Sat, 23 Sep 2017 15:58:05 -0400 Subject: [PATCH] lamp-touch also directly writes to LED array As part of blackout logic. So it needs to bounce the enabling GPIO. --- lamp-touch.lua | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.50.1