view service/tinyScreen/tiny_screen.py @ 387:486d5d6c34e0

mockup images Ignore-this: 9ecf339889235e9f763c276d0073e172
author drewp@bigasterisk.com
date Wed, 02 Jan 2019 18:39:35 -0800
parents 5cdc6e85265f
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")