Add demo.py
This commit is contained in:
parent
093802b4cf
commit
2a1f61ed4f
19
demo.py
Normal file
19
demo.py
Normal file
@ -0,0 +1,19 @@
|
||||
from datetime import datetime
|
||||
from display import DisplayBuffer, Font
|
||||
from time import sleep
|
||||
import serial, sys
|
||||
port = serial.serial_for_url("/dev/ttyUSB0", baudrate=4800)
|
||||
disp = DisplayBuffer(0x06, 128, 16)
|
||||
while True:
|
||||
# i = datetime.strftime(datetime.now(), " %H:%M:%S")
|
||||
# j = datetime.strftime(datetime.now(), " %Y-%m-%d %A")
|
||||
i = datetime.strftime(datetime.now(), " BSides TLL 2023")
|
||||
j = " K-Space.ee LAN"
|
||||
disp.put_text(i.encode("ascii"),0, 0, Font.F6)
|
||||
# Font.64 is smol fat
|
||||
# Font.F6 is light
|
||||
disp.put_text(j.encode("ascii"),0, 15, Font.F64)
|
||||
buf = disp.finalize_buffer()
|
||||
port.write(buf)
|
||||
sleep(1)
|
||||
port.close()
|
Loading…
Reference in New Issue
Block a user