OLED test
This commit is contained in:
parent
8135bde769
commit
509f9f27a3
1 changed files with 12 additions and 0 deletions
12
oled.py
Normal file
12
oled.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
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
|
||||
|
||||
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, 40), "Hello World", fill="white")
|
Loading…
Reference in a new issue