diff --git a/light9/effecteval/effectloop.py b/light9/effecteval/effectloop.py --- a/light9/effecteval/effectloop.py +++ b/light9/effecteval/effectloop.py @@ -196,7 +196,9 @@ class LedLoop(EffectLoop): for which, px255 in combined.items(): if which == 'blacklight': if px255 != self.lastSentBacklight: - yield succeed(self.serialWrite(self.boards['L'], '\x60\x01' + chr(px255))) + b = min(255, max(0, px255)) + yield succeed(self.serialWrite(self.boards['L'], + '\x60\x01' + chr(b))) self.lastSentBacklight = px255 else: board = self.boards[which]