This commit is contained in:
redfast00 2020-03-10 03:22:44 +01:00
parent c0931a8087
commit ce24054458
No known key found for this signature in database
GPG Key ID: 5946E0E34FD0553C
1 changed files with 4 additions and 0 deletions

View File

@ -9,6 +9,7 @@ import string
import base64
from queue import Queue
from threading import Thread
import subprocess
NULL_CHAR = chr(0)
@ -158,6 +159,9 @@ def message_collector(messagequeue):
keyboard.printstring('\n' * 32)
else:
keyboard.printstring(message + '\n')
args = [str(ord(s)) for s in message if 0 < ord(s) < 255][:20]
subprocess.run(["i2cset", "-y", "1", "8", "0"] + args + ['i'])
time.sleep(int(len(args) * 1.5))
keyboard.reset_color()
keyboard.file.flush()
if messagequeue.empty():