Spectrum analyzer for esp32

i want to know if there is any esp32 compatible version of spectrum analyzer. I know there is one for teensy. it clearly says “not compatible with esp32”.
if it is not available , then why ? is esp32 not powerful enough to drive rgb panel and doing some FFT at same time? I have 32x16 panel working perfectly with esp32.thanks to smartMatrix amazing work.

The esp32 is certainly powerful enough. It’s not available because no one has contributed one. If you or someone else wants to write or port an existing sketch and contribute it, that would be great, but I don’t have plans to do that myself. Glad you’re enjoying the library.

1 Like

so it is possible. I will try it by my self.thanks

Here’s a link I found:

It uses FastLED. This document gives some hints on how to convert a FastLED sketch to work with SmartMatrix Library:

thanks for pointing me in right direction i already have that sketch in my mind but did knew correct way to port to SmartMatrix library.

hi Losuie. i tried to port that sketch to smartmatrix following the guide you mentioned above code compile sucessfully but display panel is dark not showing anything. here is output of serial moniter i can post sketch if you want to have a look.
08:52:21.387 -> Starting SmartMatrix Mallocs


08:52:21.387 -> Heap/32-bit Memory Available: 336848 bytes total, 113792 bytes largest free block
08:52:21.387 -> 8-bit/DMA Memory Available : 269436 bytes total, 113792 bytes largest free block
08:52:21.422 -> SmartMatrix Layers Allocated from Heap:

08:52:21.422 -> Heap/32-bit Memory Available: 336724 bytes total, 113792 bytes largest free block
08:52:21.422 -> Starting SmartMatrix DMA Mallocs

08:52:21.422 -> sizeof framestruct: 00001000

08:52:21.422 -> DMA Memory Available before ptr1 alloc: 255872 bytes total, 113792 bytes largest free block
08:52:21.422 -> matrixUpdateFrames[0] pointer: 3FFB20D8

08:52:21.472 -> DMA Memory Available before ptr2 alloc: 255872 bytes total, 113792 bytes largest free block
08:52:21.472 -> matrixUpdateFrames[1] pointer: 3FFB30E8

08:52:21.472 -> Frame Structs Allocated from Heap:

08:52:21.472 -> Heap/32-bit Memory Available: 328276 bytes total, 113792 bytes largest free block
08:52:21.472 -> 8-bit/DMA Memory Available : 255872 bytes total, 113792 bytes largest free block
08:52:21.472 -> Allocating refresh buffer:

08:52:21.472 -> lsbMsbTransitionBit of 0 requires 24576 RAM, 113792 available, leaving 89216 free:

08:52:21.472 -> Raised lsbMsbTransitionBit to 0/7 to fit in RAM

08:52:21.472 -> lsbMsbTransitionBit of 0 gives 306 Hz refresh, 120 requested:

08:52:21.512 -> Raised lsbMsbTransitionBit to 0/7 to meet minimum refresh rate

08:52:21.512 -> Descriptors for lsbMsbTransitionBit 0/7 with 8 rows require 24576 bytes of DMA RAM

08:52:21.512 -> SmartMatrix Mallocs Complete

08:52:21.512 -> Heap/32-bit Memory Available: 303668 bytes total, 113792 bytes largest free block
08:52:21.512 -> 8-bit/DMA Memory Available : 231264 bytes total, 113792 bytes largest free block
08:52:21.512 -> Setting up parallel I2S bus at I2S1


HI again, i ported this

" https://github.com/s-marley/ESP32_FFT_VU"
for smartMatrix by including neomatrix_config.h and made some changes to sketch. now display is just white not showing actual thing. i uploaded the code to github if anyone want to have a look on it.
BTW i am using smartmatrix_gfx by marcmerlin
any help will be highly appreciated.

Is the issue with the FFT code or matrix code? Can you get your sketch to display anything on your matrix? Does a SmartMatrix_GFX demo work?

BTW @marcmerlin is active in this forum but I think you need to narrow down the issue more before asking for help.

Hi louise, sorry for late reply. I tried and what i get was a white display i think problem is with initialization for fastled sketch.if you can have a look on sketch.i am not a programmer that’s why relaying on this community

Howdy. Definitely, you want to to baby steps.
Make sure you can run the demo that comes with SmartMatrix::GFX.
That’s just to make sure your hardware is working.

After that, for neomatrix_config,h, read it carefully, make sure it has the correct options for your matrix under Smartmatrix, and try a demo from

make sure you get that working. Once that is working, you should be adapt your code to work like the demo you just ran.

Hope this helps.

Greetings arcmerlin. I run your demo code it os working.when i run my modified skatch it just display a white display (probably test for matrix) . After that nothing happens. I know loop is working (i can read “button pressed” on serial monitor). But some how actual skatch is not executing properly.

Like Marc says, take baby steps. You know the demo is working, but your sketch isn’t working. Can you add bits of the non-working sketch to the demo sketch until you figure out where it breaks?

1 Like

I don’t know if I will be able to do that but will try my best. See you soon

Muhammad, just to set expectations, typically people here won’t have the time to help you with your code, we’re all busy trying to make our own code work too :slight_smile: (and to be serious, the last person before you mostly asked me to write his code for his school project because it was hard)
Basically once you get the demos working, you are mostly on your own. It’s not easy, but it’s part of the fun and learning experience :slight_smile:
Now, if you have a specific API question that can’t be easily answered by reading the code (yes, code in those libraries is often documentation too :slight_smile: ), feel free to ask.

Good luck

1 Like

Wish me good luck :crossed_fingers::crossed_fingers:. I know it is challenging but fun too. I am not giving up. :grinning_face_with_smiling_eyes::grinning_face_with_smiling_eyes:.you guys are so motivated.i will figure it out eventually.

1 Like

Hi marcmerlin no matter what I do, my skatch is not working not even simple fastled blink skatch.if you can just tell me which changes should be made in fastled skatch while including neomtrix_config file.that would help me a lot.

What sketch are you using?
DO you have a log showing what you tried / changed?

HI. happy new year everyone, There is good news I got it working , but few things still need fix. somehow loop is broken and switching through patterns work fine until you reach .last pattern which causes esp32 to reset i don’t know why it is something to do with ISR.if you guys can tell me more about ISR i will fix it. it happens if i put non-working pattern at 1st inside the loop. I will upload the sketch soon. it requires some documentation.one thing more to ask how do we set XY code for Metrix. somehow my matrix display is upside down. here is part of my sketch with defines layout.
"const bool kMatrixSerpentineLayout = false;
uint16_t XY( uint8_t x, uint8_t y)
uint16_t i;

if( kMatrixSerpentineLayout == false) {
i = (y * kMatrixWidth) + x;

if( kMatrixSerpentineLayout == true) {
if( y & 0x01) {
// Odd rows run backwards
uint8_t reverseX = (kMatrixWidth - 1) - x;
i = (y * kMatrixWidth) + reverseX;
} else {
// Even rows run forwards
i = (y * kMatrixWidth) + x;

return i;

1 Like

Glad it’s mostly working. It’s hard to give feedback without seeing all your code, so please post it first and then I’ll take a look.

hi louis, thanks again can i post my code here?