Open marcmerlin opened 5 years ago
You can find the (huge) code that uses your lib here: https://github.com/marcmerlin/NeoMatrix-FastLED-IR/blob/c9a8df6c95c3ea62ae20d200fe9b09f57ca0d89d/NeoMatrix-FastLED-IR.ino#L2267
I realize it will likely be hard for you to know what's wrong by just looking at it or trying to reproduce given how big the code, is, but maybe we can have a guess that it's a dual core issue and conflict with SmartMatrix?
Well, is Neomatrix using the rmt peripheral? I would think the conflict is there. If both the IR and Neomatrix are trying to use the same device, it is going to have issues getting at the memory locations.
FastLED does use RMT (single channel) on ESP32. I thought 2 different libraries could use RMT, but maybe they can't. If you confirm that they can't both use RMT, I'll see if I can get FastLED to use bit banging, or its new I2S mode instead of RMT.
I ran into the same problem using FastLED and another RMT module to control an IR LED. But I think the problem is not with this library here. It is possibly a problem in FastLED or in the build in RMT driver. Using FastLED with #define FASTLED_ESP32_I2S true
(for Neopixel) did it for me.
The example code works fine on my ESP32, but when I integrate your lib in a much bigger code base that uses DMA and probably one code to push to the RGBPanels (in the SmartMatrix library), your library crashes here:
Is there a way to make this compatible with SmartMatrix?