kopia lustrzana https://github.com/cyoung/stratux
rodzic
0d4d61cf56
commit
b7beee37f0
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
from luma.core.interface.serial import i2c
|
||||||
from luma.oled.device import ssd1306, sh1106
|
from luma.oled.device import ssd1306, sh1106
|
||||||
from luma.core.render import canvas
|
from luma.core.render import canvas
|
||||||
|
|
||||||
|
@ -20,7 +21,8 @@ class StratuxScreen():
|
||||||
self.pidfile_timeout = 5
|
self.pidfile_timeout = 5
|
||||||
def run(self):
|
def run(self):
|
||||||
font2 = ImageFont.truetype('/etc/stratux-screen/CnC_Red_Alert.ttf', 12)
|
font2 = ImageFont.truetype('/etc/stratux-screen/CnC_Red_Alert.ttf', 12)
|
||||||
oled = ssd1306(port=1, address=0x3C)
|
serial = i2c(port=1, address=0x3c)
|
||||||
|
oled = ssd1306(serial)
|
||||||
|
|
||||||
with canvas(oled) as draw:
|
with canvas(oled) as draw:
|
||||||
logo = Image.open('/etc/stratux-screen/stratux-logo-64x64.bmp')
|
logo = Image.open('/etc/stratux-screen/stratux-logo-64x64.bmp')
|
||||||
|
|
Ładowanie…
Reference in New Issue