From b1d8fe5ae6df3c0750b13a313a515f141880e346 Mon Sep 17 00:00:00 2001 From: bton Date: Fri, 12 Apr 2024 18:38:43 +0200 Subject: [PATCH] test --- oled.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/oled.py b/oled.py index 2f5ff25..b7eb6c0 100644 --- a/oled.py +++ b/oled.py @@ -11,7 +11,9 @@ device = ssd1306(serial) #fonts name_font=("Purisa", 20, "bold") - +name_position=(50,0) +user_id_font=("Purisa", 20, "bold") +user_id_position(30,0) def balance(user_name, balance): with canvas(device) as draw: @@ -19,6 +21,6 @@ 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") + draw.text(user_id_position, "1", fill="white", font=user_id_font) + draw.text(name_position, "Test", fill="white", font=name_font) time.sleep(10)