I’ve been wanting to add WiFi features to the SmartMatrix Library since I came out with the first shield. I looked at each of the recent popular WiFi platforms as they were released, e.g. Particle Photon and ESP8266, and they didn’t have the DMA capabilities that were needed to drive HUB75 panels with high color depth and high refresh rate. I was excited about the ESP32 when I learned of it, as it has a ton of memory, and DMA support. With some very relevant example code that showed how to use the ESP32’s I2S peripheral in parallel mode, plus a lot of hard work, I ported SmartMatrix Library over to the ESP32. There’s still some kinks being worked out, but it’s proving to be a very promising platform.
The SmartMatrix Library ESP32 port at a low level is based on Sprite_TM’s ESP32 I2S Parallel example. The ESP32 can continuously shift data from RAM through the I2S peripheral in parallel to GPIO pins, without using up CPU cycles. This wasn’t obvious to me from reading through the reference manual, and this peripheral doesn’t have great documentation or example code besides Sprite_TM’s example, so this was an invaluable start to the project. It was a challenge to move from the example with 21-bit color refresh to approaching the SmartMatrix Library’s performance on the Teensy with up to 48-bit color and high refresh rates. The example code didn’t scale well in RAM usage or refresh rate when increasing color depth. The architecture of the ESP32 and the Freescale processors used in the Teensy 3 family are so different a lot of the tricks I used on the Teensy 3 wouldn’t port over. There are some significant changes from the Teensy Platform, but in general, sketches that used the Teensy SmartMatrix Library should work with the ESP32 SmartMatrix Library.
ESP32 port of the SmartMatrix Library: