Matrix.stop() to Completely Shut Off LED Matrix

Hi, @Louis. I am using the ESP32 with forum wiring and the SmartMatrix 4.0 library.

Is there any mechanism to perform the equivalent of matrix.stop()? I need to keep the ESP32 active, but I also need to be able to stop (and eventually restart) the SmartMatrix code. Making the brightness = 0 will reduce power consumption, but what would be much more effective would be to stop latching data, disable Output Enable, and stop the clock going to my LED matrix.

Was matrix.stop() ever implemented in SmartMatrix? I can’t find it, if so. Thank you!

Hi Michael, no this doesn’t exist. It hasn’t been a popular request over the years and I’ve never had a need for it. Brightness=0 is probably the best you can do right now without a hack that disables output, but requires a reset of the micro to get the matrix running again.

if I had to do this, I would find the ISR in the code, and disable the timer that calls it, or set a global, and in the ISR code, check for it, delay(1) and return if it’s set, instead of running the rest of the code.

Marc, great suggestion, and that makes good sense! Perhaps someone has dug this deep into the code and has a feel for where that interrupt service routine might be. :grinning:

I’m not going to grep the code for you, but if you don’t find it, @Louis can probably give you a hint.

I am defiantly way out of my depth of experience on this one but thought I would throw out a suggestion of wiring the OE pin on the level sifters to an analog pin and pull the pin high to turn them off instead of stopping/restarting the matrix code.

Nope, I wouldn’t expect any users to do the searching, other than me. I thought those who are most familiar with the code (@Louis :wink:) might know where to start looking: e.g., would the ISR be in SmartMatrix code or somewhere deep in the Adafruit code?

it’s in the smartmatrix code for sure.
sauron:~/arduino/libraries/SmartMatrix$ grep -ri ISR .
gives plenty of hits, note that the ISR is per architecture, so there is more than one. For instance:
./src/esp32_i2s_parallel.c:static void IRAM_ATTR i2s_isr(void* arg) {

Excellent! Thank you, Marc.