Mercurial > code > home > repos > homeauto
comparison service/tinyScreen/tiny_screen.py @ 1189:c1cf544711da
start tiny_screen
Ignore-this: 3fb7ee4bea3f9f660fd275de2964afc4
darcs-hash:af475a8625caaad03e64f15ccf9d13ccd76b1323
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Tue, 01 Jan 2019 10:15:25 -0800 |
parents | |
children | c146fa2bc7d4 |
comparison
equal
deleted
inserted
replaced
1188:afd19bf8b499 | 1189:c1cf544711da |
---|---|
1 from luma.core.interface.serial import spi | |
2 from luma.core.render import canvas | |
3 from luma.oled.device import ssd1331 | |
4 | |
5 | |
6 class Screen(object): | |
7 def __init__(self, spiDevice=1, rotation=0): | |
8 self._dev = ssd1331(spi(device=spiDevice, port=0), rotation=rotation) | |
9 with canvas(self._dev) as draw: | |
10 draw.rectangle(d.bounding_box, outline="white", fill="red") | |
11 |