rm-hull / luma.examples

Companion repo for running examples against the luma.oled, luma.lcd, luma.led_matrix and luma.emulator display drivers.
MIT License
370 stars 144 forks source link

ModuleNotFoundError: No module named 'demo_opts' #116

Closed dubmachine closed 4 years ago

dubmachine commented 4 years ago

Attempted to run a few of the examples but getting an error ModuleNotFoundError: No module named 'demo_opts'. Unfortunately I have been unable to find this module

I can run this code successfully, any ideas?

from luma.core.interface.serial import spi
from luma.core.render import canvas
from luma.lcd.device import pcd8544

serial = spi(port=0, device=0, gpio_DC=23, gpio_RST=24)
device = pcd8544(serial, rotate=1)

# Box and text rendered in portrait mode
with canvas(device) as draw:
    draw.rectangle(device.bounding_box, outline="white", fill="black")
    draw.text((10, 40), "Hello World", fill="red")
thijstriemstra commented 4 years ago

that file can be found here: https://github.com/rm-hull/luma.examples/blob/master/examples/demo_opts.py

It contains helper functions for making it easy to run the examples. It's not a required file, your code looks fine.