Description
I'm new to both python and coding for arduino micro controllers so please bear with me if I missed something obvious.
I'm trying to use the trellis python library on a adafruit trinket M0. I read over the readme and installed the dependency list and installed the adafruit bus device lib
directory on my trinket. I also double checked my boot_out.txt
file on the trinket and confirmed that I'm a 2.0+ version of circuit python:
Adafruit CircuitPython 2.2.4 on 2018-03-07; Adafruit Trinket M0 with samd21e18
To start out I tried copy/pasting the readme demo code into my main.py file:
import time
import busio
from board import SCL, SDA
from adafruit_trellis import Trellis
# Create the I2C interface
i2c = busio.I2C(SCL, SDA)
# Create a Trellis object for each board
trellis = Trellis(i2c) # 0x70 when no I2C address is supplied
# Turn on every LED
print('Turning all LEDs on...')
trellis.led.fill(True)
time.sleep(2)
# Turn off every LED
print('Turning all LEDs off...')
trellis.led.fill(False)
time.sleep(2)
The trellis was unresponsive, so I screen
ed into the trinket to watch the output. When I did I received the following error message:
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
main.py output:
Traceback (most recent call last):
File "main.py", line 10, in <module>
File "adafruit_trellis.py", line 155, in __init__
File "adafruit_trellis.py", line 111, in fill
File "adafruit_trellis.py", line 202, in show
TypeError: 'bytearray' object does not support item assignment
I've not dug yet into the adafruit_trellis.py
file yet to wrap my head around what's going on. I wanted to post the issue here first to see if there's an obvious thing I'm missing.
Thanks!!