pixelmatix / SmartMatrix

SmartMatrix Library for Teensy 3, Teensy 4, and ESP32
http://docs.pixelmatix.com/SmartMatrix
621 stars 162 forks source link

Incompatibility with WS2812 (or long interrupt disables) #40

Closed embedded-creations closed 3 years ago

embedded-creations commented 7 years ago

http://community.pixelmatix.com/t/problem-with-smartmatrix-library-and-another-led-strip/184/8

marcmerlin commented 5 years ago

As per my experience with timing driven neopixels, they are unlikely to work with SmartMatrix as long as both SmartMatrix and FastLED use bit banging and interrupt time critical code (technically SmartMatrix could yield interrupts to FastLED since FastLED must send its waveform without a clock with exact timing, but I'm not hopeful that both and reasonably work at the same time in a useful fashion if smartmatrix is driving bigger panels that tax resources). I think it could work in some cases, but it would be fragile, at best.

There are solutions outside of using LED strips that have a clock line: 1) write a neopixel driver for teensy that uses DMA instead of bit banging 2) switch to ESP32 which already has such a neopixel driver (it uses RMT and offloads the exact timing ot the RMT chip, leave the CPU to do work for SmartMatrix)