matekasse_NFC-Reader/oled.py
2024-04-10 21:46:04 +02:00

14 lines
431 B
Python

from luma.core.interface.serial import i2c, spi, pcf8574
from luma.core.interface.parallel import bitbang_6800
from luma.core.render import canvas
from luma.oled.device import ssd1306
import time
serial = i2c(port=1, address=0x3C)
device = ssd1306(serial)
with canvas(device) as draw:
#draw.rectangle(device.bounding_box, outline="white", fill="black")
draw.text((30, 0), "Hello World", fill="white")
time.sleep(10)