Closed garthk closed 3 years ago
I just read the source code for NeoPixel, and I think I can come up with a few improvements. I'll report back.
Copying directly into the buffer and avoiding dot-referencing through all the modules helps: this version is within 2000ms of the 420ms required to just write the pixels.
Yeah, that'll do for now.
I just hooked up 235 pixels using an 8 channel knock-off of the Adafruit 4-channel I2C-safe Bi-directional Logic Level Converter - BSS138. Such overkill for one logic line, but it's keeping the 5V supply to the strip away from the SAO port.
My booting show-off flash in #38 is doing what I'd intended: at boot time, reassure me that I've configured and wired my LEDs correctly. Reckon I might port just the flash to
aiko.led
for that reason. But, it's sloooow. Writing 243 updates to 7 pixels each time and then callingaiko.led.np.write
again is taking 7800ms with a delay of 1ms, 7900ms with thetime.sleep_ms
code removed—I'm not sure why—and 1990ms even if I do nothing except callaiko.led.np.write()
243 times with 235 pixels. I'll track my work trying to speed it up here until I raise the PR.Core loop: