How to keep animation running at the same speed despite large amount of pixels

I am running a ‘Comet Animation’. When I run it on just one neopixel strip (144 LEDs), it runs at normal speed (fast). But when I increase the number of LEDs (I want a long strip of 6 meters which is 864 LEDs), the animation drastically slows down. Is there any way to keep the animation running at its normal speed despite this large number of pixels?

The number of individual pixels will inevitably impact the update speed.
IMO the only way to decrease the time needed for the update is to go for faster LEDs (e.g. AP102), but these are usually considerably more expensive.

2 Likes

Maybe you can change your led wiring?

More LEDs I’m series are slower because the total buffer length is longer, so it takes longer to send.

If you parallelize your strips, so that you have 6x1m (using 6 pins) instead of 1x6m (1 pin), you can maybe parallelize the sending.

Unfortunately the standard Neopixel library
blocks the CPU while sending, so it can send only one strip/pin at a time.

Something like the Teensy OctoWS2811 may help. That uses hardware-specific DMA and internal timer wizardry to update 8 strips in parallel. The Teensy lib won’t work on a photon, but maybe using a teensy instead of the Photon is an option for you?

P.s. the basic principles behind the wizardry are explained in the link. Pwm triggers DMA transfers of carefully prepared bytes to the IO register for the 8 pins. Maybe a particle elite/employee can comment if the photon has this kind of hardware?

P.p.s. maybe the fastLed library can help a little? It has the same basic problem as the normal library, but should use less CPU. See also: (SOLVED) fastled library not working on photon

2 Likes