fastLED degrades PWM outputs Arduino

20 Views Asked by At

I'm using the SAMD21 to build a synth that requires audio-rate outputs as well as LED control (SK6812). The audio outputs use PWM, and are being updated via interrupts at 48kHz. In the loop() function, I'm updating the LEDs with fastLED.show(). The issue is that it seems like fastLED.show disables interrupts, so during that time the waveform is not changing. This degrades the output with visible dips during those calls.

Sadly I can't align the updates by pushing to the leds within the interrupt because it seems like you're not allowed to call fastLED.show in the interrupt itself. Is there anyway to split up the call to push one led or bit at a time? Then each call wouldn't take as long. Or potentially use a secondary chip to drive the leds? I'm not sure what the solution is here.

0

There are 0 best solutions below