adafruit / Adafruit_CircuitPython_HT16K33

Adafruit CircuitPython driver for the HT16K33, a LED matrix driver IC.
MIT License
41 stars 29 forks source link

image() slow if auto_write on #78

Closed caternuson closed 3 years ago

caternuson commented 4 years ago

The image() function does a loop and sets the display pixel by pixel: https://github.com/adafruit/Adafruit_CircuitPython_HT16K33/blob/4eed803ef43d33d89231fae36da47e0356cb3c61/adafruit_ht16k33/matrix.py#L145-L147 If auto_write is on, this will cause the entire display to be updated with each pixel set: https://github.com/adafruit/Adafruit_CircuitPython_HT16K33/blob/4eed803ef43d33d89231fae36da47e0356cb3c61/adafruit_ht16k33/ht16k33.py#L138-L139 This leads to a noticeably slow update.

Could maybe force auto_write off before looping and then back to whatever it was after the loop.

makermelissa commented 4 years ago

That's how I would do it. :) Don't forget to apply the same thing in the Matrix8x8x2 class's image() function.