Esp32 webserver for smartmatrix bassed on fastled

i have your aurora working then i started to get working on this code. i really don’t need IR and already trying to figure it out to disable it. can you be more specific on this, how can i diable IR function. and yes my panel is small 32x16 and PSRAM is enabled.

RECV_PIN in nfldefines.h enables IR.
If you undefine it, IR should not be compiled in.

(and there are indeed 2 config files, nfldefines is just for this code, while neomatrix_config.h is a common matrix config file I designed to work with all the demos I’ve written or integrated).
But I’ve also just renamed RECV_PIN to IR_RECV_PIN to make it more clear how to disable IR.

after disabling IR i am having same that error i mentioned before. i think it’s time to move forward i will use your code to add 2D patterns in my version of webserver. that code is fairly simple for me to work with.

after updating few libraries i got same error. it is something to do withLEDSprite library. i will not be using pacman animation animation. All i want is to get somehow Aurora animation web controlled. i want to disable LEDSprite library is there any way to do so?

Hi. My apologies, I didn’t see your update until now.
Now, you don’t need LEDSprite if you remove the pacman demo .

If you only need Aurora, don’t use my whole demo, just import the Aurora directory

there is good news i got working your part of code , i.e FireWorks, Sublime demos, twinkel fox.they work fine individually in a single Sketch. when i combine them with esp32 web server files Esp-32 goes mad. here is serial output.

ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
*** Start:
Heap Memory Available: 309652 bytes total, 113792 bytes largest free block:
8-bit Accessible Memory Available: 256200 bytes total, 113792 bytes largest free block:
32-bit Memory Available: 309652 bytes total, 113792 bytes largest free block:
DMA Memory Available: 256200 bytes total, 113792 bytes largest free block:
Listing directory: /
FILE: /css/styles.css SIZE: 31
FILE: /favicon.ico SIZE: 4286
FILE: /images/atom196.png SIZE: 5469
FILE: /index.htm SIZE: 10733
FILE: /js/app.js SIZE: 13101
SPIFFS:
Heap Memory Available: 304668 bytes total, 113792 bytes largest free block:
8-bit Accessible Memory Available: 251216 bytes total, 113792 bytes largest free block:
32-bit Memory Available: 304668 bytes total, 113792 bytes largest free block:
DMA Memory Available: 251216 bytes total, 113792 bytes largest free block:
Connecting to my device
WiFi:
Heap Memory Available: 254200 bytes total, 113792 bytes largest free block:
8-bit Accessible Memory Available: 200748 bytes total, 113792 bytes largest free block:
32-bit Memory Available: 254384 bytes total, 113792 bytes largest free block:
DMA Memory Available: 200932 bytes total, 113792 bytes largest free block:
HTTP server started
Web:
Heap Memory Available: 251504 bytes total, 113792 bytes largest free block:
8-bit Accessible Memory Available: 198052 bytes total, 113792 bytes largest free block:
32-bit Memory Available: 251504 bytes total, 113792 bytes largest free block:
DMA Memory Available: 198052 bytes total, 113792 bytes largest free block:
Framebuffer_GFX::begin Width: 32 Height: 16 Num Pixels: 512
Guru Meditation Error: Core 1 panic’ed (StoreProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400d21d3 PS : 0x00060430 A0 : 0x800d4cf0 A1 : 0x3ffb1f60
A2 : 0x00008391 A3 : 0x00000568 A4 : 0x00000275 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x00000000 A9 : 0x00000000
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x00000000 A13 : 0x3ffb1c30
A14 : 0x3ffb1c30 A15 : 0x00000002 SAR : 0x0000000a EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff
Backtrace: 0x400d21d3:0x3ffb1f60 0x400d4ced:0x3ffb1f90 0x400dd1b5:0x3ffb1fb0 0x40088b7d:0x3ffb1fd0

i traced back these errors to following lines of code

from TwinkleFox:

matrixleds[idx] = blend( bg, c, deltabright * 8);

from main loop:

patterns[currentPatternIndex].pattern();

from ESP-32 Core:

0x400dd1b5: loopTask(void)* at C:\Users\Neo69\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\ main.cpp line 19
0x40088b7d: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/ port.c line 143

do you have any idea what is going on ? i can upload this code some where if you want to have a look.

Glad you’re making progress.
At this point though, you’ll have to do your own debugging with printf and stack traces since you’re not running my code unmodified anymore
Good luck :slight_smile:

yeah that is it I guess, but i will figure it out eventually. i am hard core type :grinning: :grinning:
once it is working i will bring up progress and will inform you. currently running TwinkleFox it is so amazing.
thank you soo much.

Hi @marcmerlin here is one more thing i need to know. While porting FastLed sketch to SmartMatrix we need to do conversion from CHSV to rgb24 according to this MIGRATION.md. If we are using your SmartMatrix_gfx we don’t need to do such thing while including neomatrix_config.h in our sketch. right? because after studying your TwinkleFox skatch i came to know that matrixleds array is taking care if such thing. am i right ?

You are correct, if you are using SmartMatrix::GFX, you can use all FastLED types and primitives, including CHSV. This is because it uses an array of CRGB, as if you were using FastLED::NeoMatrix.
What my library does is store this into Framebuffer::GFX the same exact way regardless of where it goes afterwards, in your case it gets sent to SmartMatrix.

1 Like

Yeah i expected this. i ported few more examples from FastLed to work with SmartMatrix.Thanks to magic neomatrix_config.h. but XY Coordination is still a mystery for me.

XY in the case of smartmatrix is an obvious rectangular mapping, but either way, you get not to care since the library takes care of that for you.
Then if you change to some hardware that is less obvious, it’ll remap for you without you having to change your code.
Adafruit really did a great job with neomatrix XY mapping (which I shamelessly took for my lib)

1 Like

Now i think i got all the recipe. Now it’s time to cook some SmartMatrix Sketch.