Closed LouisPi closed 5 years ago
Here is my code:
from luma.core.interface.serial import spi from luma.core.render import canvas from luma.lcd.device import st7735 serial = spi(height=128, width=128, h_offset=1, v_offset=2, bgr=True) device = st7735(serial) with canvas(device) as draw: draw.rectangle(device.bounding_box, outline="white", fill="black") draw.text((30,40), "Hello World", fill="red")
and here is my error message:
Traceback (most recent call last): File "gui.py", line 5, in <module> serial = spi(height=128, width=128, h_offset=1, v_offset=2, bgr=True) TypeError: __init__() got an unexpected keyword argument 'width'
Any idea what I am doing wrong? The unexpected keyword argument is different each time and I can run the examples fine.
you're instantiating spi incorrectly, there's not a width param: https://github.com/rm-hull/luma.core/blob/master/luma/core/interface/serial.py#L250
width
See https://luma-lcd.readthedocs.io/en/latest/python-usage.html
Here is my code:
and here is my error message:
Any idea what I am doing wrong? The unexpected keyword argument is different each time and I can run the examples fine.