Mercurial > code > home > repos > homeauto
view 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 |
line wrap: on
line source
from luma.core.interface.serial import spi from luma.core.render import canvas from luma.oled.device import ssd1331 class Screen(object): def __init__(self, spiDevice=1, rotation=0): self._dev = ssd1331(spi(device=spiDevice, port=0), rotation=rotation) with canvas(self._dev) as draw: draw.rectangle(d.bounding_box, outline="white", fill="red")