~xenrox/status-display

status-display/test.py -rw-r--r-- 421 bytes
893f85f3Thorben Günther Rename config.ini to example.ini 11 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import driver as epd
from PIL import Image, ImageDraw, ImageFont

epd = epd.EPD()

print("init and clear")
epd.init()
epd.clear()

font = ImageFont.truetype("Roboto-Regular.ttf", 200)

print("draw")
Himage = Image.new("1", (epd.width, epd.height), 255)  # 255: clear the frame
draw = ImageDraw.Draw(Himage)
draw.text((100, 100), "xenrox", font=font, fill=0)
epd.display(epd.getbuffer(Himage))

print("sleep")
epd.sleep()