adafruit / Adafruit_DotStar_Pi

DotStar module for Python on Raspberry Pi
GNU General Public License v3.0
60 stars 30 forks source link

SPI when brightness isn't maximum is incredibly slow #2

Closed EricBayer closed 9 years ago

EricBayer commented 9 years ago

If the brightness is max, SPI is quite fast. All the writes slow the whole thing down. Bitbanging is always really fast. As SPI is a more system friendly way, I wanted this to work fast. To accomplish this, I allocated a secondary buffer and I fill it first and then transmit it with raw_write. This appears to work very fast. NOTE: This has the other SPI fix mixed in too.

https://gist.github.com/EricBayer/67dc79cdc65ce2247f73

PaintYourDragon commented 9 years ago

Incorporated into latest commit, w/attribution. Thanks for fixing this up!