added name error exception

Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>
master
Ebbe Baß 2022-07-02 00:49:02 +02:00
parent b1c4e67722
commit cf5e06c192
1 changed files with 6 additions and 0 deletions

View File

@ -212,6 +212,12 @@ if __name__ == '__main__':
rainbowCycle(strip)
elif mode == 1:
try:
r
except NameError:
r = "255"
g = "0"
b = "0"
setColor(strip, Color(int(r), int(g), int(b)))
time.sleep(1)
else: