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)