From c9614703c4ffe4137f59deeefb3c89bd576674e8 Mon Sep 17 00:00:00 2001 From: bton Date: Fri, 12 Apr 2024 18:34:25 +0200 Subject: [PATCH] test --- oled.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/oled.py b/oled.py index 9ccada9..2f5ff25 100644 --- a/oled.py +++ b/oled.py @@ -7,12 +7,11 @@ from pathlib import Path import time serial = i2c(port=1, address=0x3C) - device = ssd1306(serial) -def make_font(name, size): - font_path = str(Path(__file__).resolve().parent.joinpath('fonts', name)) - return ImageFont.truetype(font_path, size) +#fonts +name_font=("Purisa", 20, "bold") + def balance(user_name, balance): with canvas(device) as draw: @@ -21,4 +20,5 @@ def balance(user_name, balance): with canvas(device) as draw: #draw.rectangle(device.bounding_box, outline="white", fill="black") draw.text((30, 0, 50), "Hello World", fill="white") + draw.text((80, 0, 50), "Test", fill="white") time.sleep(10)