This commit is contained in:
Robert Borzutzki 2022-10-19 13:50:03 +02:00
parent acc0cae26e
commit 2e5de68399

View File

@ -78,10 +78,13 @@ def on_message(client, userdata, msg):
line = 60
print(line)
drawblack.text((150, line), " ", font = font10, fill = 0)
epd.DisplayPartial(epd.getbuffer(HBlackimage))
drawblack.text((150, line), msg.payload.decode(), font = font10, fill = 0)
epd.DisplayPartial(epd.getbuffer(HBlackimage))
epd.init()
epd.Clear()
values_image = Image.new('1', (epd.width, epd.height), 255)
values_draw = ImageDraw.Draw(values_image)
values_draw.text((150, line), msg.payload.decode(), font = font10, fill = 0)
epd.DisplayPartial(epd.getbuffer(values_image))
#print(f"`{msg.topic}`: `{msg.payload.decode()}`")
Connected = False #global variable for the state of the connection