adafruit / Adafruit_CircuitPython_DotStar

Dotstarrin' away in CircuitPython land
MIT License
46 stars 38 forks source link

Changing brightness will now update the strip if auto_write is True. … #12

Closed mattytrentini closed 6 years ago

mattytrentini commented 6 years ago

…See Issue #10.

Tested on a Trinket M0 with a 30x LED APA102 strip.

mattytrentini commented 6 years ago

Maybe of note: While testing on the Trinket M0 I noticed that the file is now large enough to trigger a MemoryError. What's the chance that an additional 5 lines would tip it over the edge?! :)

To work around this issue on the Trinket I temporarily deleted the implementation of deinit. Worked fine (as long as deinit isn't required!) which suggests a genuine memory limit. I presume - though haven't tested - that using mpy-cross as documented here would provide another workaround.

mattytrentini commented 6 years ago

Oh, I just noticed that the Trinket M0 has a lib directory with a dotstar.mpy file in it. Seems that Adafruit already precompiles the DotStar implementation to save memory.

tannewt commented 6 years ago

Yup! mpy-cross reduces the memory required to import the file by a lot. So, this change doesn't worry me.