2024-04-10 18:50:30 +00:00
|
|
|
from luma.core.interface.serial import i2c, spi, pcf8574
|
|
|
|
from luma.core.interface.parallel import bitbang_6800
|
|
|
|
from luma.core.render import canvas
|
2024-04-10 19:46:04 +00:00
|
|
|
from luma.oled.device import ssd1306
|
2024-04-10 20:26:18 +00:00
|
|
|
from PIL import ImageFont
|
|
|
|
from pathlib import Path
|
2024-04-10 19:40:36 +00:00
|
|
|
import time
|
2024-04-10 18:50:30 +00:00
|
|
|
|
|
|
|
serial = i2c(port=1, address=0x3C)
|
|
|
|
device = ssd1306(serial)
|
|
|
|
|
2024-04-12 16:34:25 +00:00
|
|
|
#fonts
|
|
|
|
name_font=("Purisa", 20, "bold")
|
|
|
|
|
2024-04-10 20:26:18 +00:00
|
|
|
|
|
|
|
def balance(user_name, balance):
|
|
|
|
with canvas(device) as draw:
|
|
|
|
pass
|
|
|
|
|
2024-04-10 18:50:30 +00:00
|
|
|
with canvas(device) as draw:
|
2024-04-10 19:48:16 +00:00
|
|
|
#draw.rectangle(device.bounding_box, outline="white", fill="black")
|
2024-04-12 16:29:29 +00:00
|
|
|
draw.text((30, 0, 50), "Hello World", fill="white")
|
2024-04-12 16:34:25 +00:00
|
|
|
draw.text((80, 0, 50), "Test", fill="white")
|
2024-04-10 19:47:36 +00:00
|
|
|
time.sleep(10)
|