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
|
|
|
|
from luma.oled.device import ssd1306, ssd1309, ssd1325, ssd1331, sh1106, sh1107, ws0010
|
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)
|
|
|
|
|
|
|
|
with canvas(device) as draw:
|
2024-04-10 19:35:53 +00:00
|
|
|
#draw.rectangle(device.bounding_box, outline="white", fill="black")
|
2024-04-10 19:38:16 +00:00
|
|
|
draw.text((30, 0), "Hello World", fill="white")
|
2024-04-10 19:40:36 +00:00
|
|
|
time.sleep(10)
|