Mercurial > code > home > repos > homeauto
comparison service/tinyScreen/tiny_screen.py @ 384:5cdc6e85265f
start tiny_screen
Ignore-this: 3fb7ee4bea3f9f660fd275de2964afc4
author | drewp@bigasterisk.com |
---|---|
date | Tue, 01 Jan 2019 10:15:25 -0800 |
parents | |
children | c146fa2bc7d4 |
comparison
equal
deleted
inserted
replaced
383:8f5a16a55f64 | 384:5cdc6e85265f |
---|---|
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 |