From 1074a70fb07cdf1f1bb03dd023b33eda2107da65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorben=20G=C3=BCnther?= Date: Fri, 10 Jul 2020 13:11:22 +0200 Subject: [PATCH] Add time and date to status display. --- status-display.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 status-display.py diff --git a/status-display.py b/status-display.py new file mode 100644 index 0000000..219cf36 --- /dev/null +++ b/status-display.py @@ -0,0 +1,18 @@ +import driver as epd +from modules.timestamp import timestamp_str +from PIL import Image, ImageDraw, ImageFont + +font35 = ImageFont.truetype("Roboto-Bold.ttf", 35) + +epd = epd.EPD() +epd.init() + +Himage = Image.new("1", (epd.width, epd.height), 255) +draw = ImageDraw.Draw(Himage) + +draw.text((520, 0), timestamp_str(), font=font35, fill=0) + +buffer = epd.getbuffer(Himage) +epd.clear() +epd.display(buffer) +epd.sleep() -- 2.44.0