SmartMatrix Library ESP32 Port


#41

Add unique header files to the SmartMatrix Library inside each instance of the SmartMatrix Library. Have the header file contain #include <SmartLEDShieldV4.h> for the Teensy one, and #include <SmartMatrix3.h> for the ESP32 one.

So in your Teensy sketch you `#include <SmartMatrix_Teensy_Unique_Header.h>

In your ESP32 sketch you `#include <SmartMatrix_ESP32_Unique_Header.h>


#42

Good tip, I’ll try that, thanks. To be clear the teensylc/ESP32 branch is not compatible with teensy v3.x, so I can’t just use that branch for both, correct?


#43

Hmm, some weirdness with the Layers sketch on ESP32. Not sure why.

You can try lowering the CLK rate on the ESP32 sketch. I can’t remember off hand how to do that, but there’s support for doing it.


#44

Here is a better demo of teensy v3.6 (top) vs ESP32 direct wiring (bottom)


the demo mostly works, you can see a bit of ghosting on the white font (strangely no ghosting when I use 64x64 panel output instead of 64x32). Strangely too the first background is dark red by default with teensy, but full black with ESP32.

On the bright side, ESP32 is 99% working for me out of the box with direct wiring, so thank you for that :slight_smile:

I originally had some thoughts/questions about sync rate changing and how to not make it look so bad when filming, but I split that to a separate thread: Working around sync offsets and flicker when filming/taking pictures


Working around sync offsets and flicker when filming/taking pictures
#45

Actually since I’ll be working with both the ESP32 and teensy trees: is it accurate that master and teenylc(aka ESP32) have diverged and that one is not inclusive of the other?
Or does one of the trees work on both chips and I don’t have to switch back and forth?


#46

teensylc branch supports both but the Teensy code was extensively refactored and probably contains more bugs than the latest release.


#47

This is a known issue (unknown solution). I noted this in the README: “Need a ~10ms delay between matrix.begin() and drawing to backgroundLayer”


#48

Thanks for clearing up the teensylc branch. I’ll make sure only to use it for ESP32 then. And no big deal with the red background issue, I was just checking the differences between the two. All in all ESP32 worked pretty well, even with direct wiring which you haven’t used in a while.
Given that it’s unlikely that I’ll get neopixel strips working with teensy ( SmartMatrix + FastLED Neopixels + Interrupt driven IR) this is good news. I’ll try and do more work with ESP32 since it seems to work well enough.

Joyeux Noël, Marc