Esp32 webserver for smartmatrix bassed on fastled

I am bit late here. it looks like someone left incomplete work here.
https://github.com/pixelmatix/esp32-fastled-webserver/tree/SmartMatrix
so i took some time to complete it. now it is fully working except three patterns.
here is link
https://github.com/alpha815/esp32-fastled-smartmatrix-webserver

  1. twinkle

  2. confetti

  3. rainbow with glitter

it is something to do with CHSV to rgb24Conversion. as of smartmatrix3 There’s no automatic conversion from FastLED’s CHSV to rgb24. i don’t know if it was done in smartmatrix4. most of patterns are 1D( for led strip) they don’t look nice on matrix panels. i try to add 2D from Aurora if possible but right now only 1D patterns are available. i did not get individual patterns working from Aurora. maybe after few more tries , who knows :sweat_smile:

This may help with the CRGB/CHSV conversion:

See FastLED section

If you are interested in web controlled 2D, I have spent the last months on this, using a different web library where all the web is in the code, so no need to sync code and spiffs/fatfs files (super handy).
have a look at :

I use this webserver, which I found was easier to use:

This is a demo of the web server controlling ESP32 and smartmatrix (which in turn is also controlling a rPI displaying in a higher res, but you can skip that):

hi louis, thanks for your kind reply. as i mentioned these patterns are 1D. so i am not going to spend time here. but i will update it to 2D patterns Asap. But yet need to figure out how Aurora works, because most of patterns will be borrowed from there, any guidelines on Aurora ?

Hi marcmerlin i remember this and have eyes on it, will give a hit very soon. thanks for your kind reply.

Cool. Hopefully you’re comfortable reading code, .h files and adjusting things as needed. I tried to put reasonable comments and ifdefs, but of course it always makes more sense to the person who wrote it :slight_smile:
The code should still mostly work on ESP8266 with a FastLED Matrix, definitely works on ESP32 with smartmatrix, works on rPi, and works on linux with arduinoonPc.
The only thing you need to do is make sure you upload a FatFS (or SPIFFS) with a the GIFs and the required config file that maps demo numbers per architecture (this in turn allows you edit what demos are being shown in rotation at runtime through the web interface)

you are right. while compiling i keep getting error

cannot convert ‘PatternAttract*’ to 'Aurora Drawable*

i tried to undefined this pattern but still get this error on next pattern i really don’t know what’s going on.

did you run git submodule update --recursive --init ? (make sure demos/… isn’t empty)

Also, are the symlinks working (hopefully you’re not on windows)?

More generally, you might want to start simple, go into FastLED_NeoMatrix_SmartMatrix_LEDMatrix_GFX_Demos/GFX/Aurora at 85b6b4ffdc09d753ddad68afc6a6598dd33c01db · marcmerlin/FastLED_NeoMatrix_SmartMatrix_LEDMatrix_GFX_Demos · GitHub
and make sure that Aurora itself, works.
(that means also making sure neomatrix_config.h is setup correctly for your matrix, but it does default to smartmatrix on ESP32, so without touching it, it should build and display something that might be broken, but you can fix that later)

unfortunately yes I am using windows and Arduino IDE. i some how get rid of that error. after compiling millions of times now i am once again clueless. a new error has arise.

can’t compile for esp32
Multiple libraries were found for “IRremote.h”
Used: C:\Users\Neo69\Documents\Arduino\libraries\IRremote
Not used: C:\Users\Neo69\Documents\Arduino\libraries\Arduino-IRremote-master
Multiple libraries were found for “WiFi.h”
Used: C:\Users\Neo69\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
Using library Adafruit_GFX_Library at version 1.10.2 in folder: C:\Users\Neo69\Documents\Arduino\libraries\Adafruit_GFX_Library
Using library FastLED at version 3.4.0 in folder: C:\Users\Neo69\Documents\Arduino\libraries\FastLED
Using library LEDMatrix-master in folder: C:\Users\Neo69\Documents\Arduino\libraries\LEDMatrix-master (legacy)
Using library FFat at version 1.0 in folder: C:\Users\Neo69\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\FFat
Using library FS at version 1.0 in folder: C:\Users\Neo69\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\FS
Using library SmartMatrix-teensylc at version 3.1.0 in folder: C:\Users\Neo69\Documents\Arduino\libraries\SmartMatrix-teensylc
Using library SmartMatrix_GFX at version 1.2 in folder: C:\Users\Neo69\Documents\Arduino\libraries\SmartMatrix_GFX
Using library Framebuffer_GFX at version 1.0 in folder: C:\Users\Neo69\Documents\Arduino\libraries\Framebuffer_GFX
Using library LEDSprites-master in folder: C:\Users\Neo69\Documents\Arduino\libraries\LEDSprites-master (legacy)
Using library FastLED_NeoMatrix-master at version 1.2 in folder: C:\Users\Neo69\Documents\Arduino\libraries\FastLED_NeoMatrix-master
Using library OmEspHelpers-master at version 1.7.20201029 in folder: C:\Users\Neo69\Documents\Arduino\libraries\OmEspHelpers-master
Using library WiFi at version 1.0 in folder: C:\Users\Neo69\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
Using library ESPmDNS at version 1.0 in folder: C:\Users\Neo69\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\ESPmDNS
Using library WebServer at version 1.0 in folder: C:\Users\Neo69\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WebServer
Using library Update at version 1.0 in folder: C:\Users\Neo69\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\Update
Using library IRremote at version 2.8.0 in folder: C:\Users\Neo69\Documents\Arduino\libraries\IRremote
Using library Adafruit_BusIO at version 1.6.0 in folder: C:\Users\Neo69\Documents\Arduino\libraries\Adafruit_BusIO
Using library Wire at version 1.0.1 in folder: C:\Users\Neo69\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\Wire
Using library SPI at version 1.0 in folder: C:\Users\Neo69\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\SPI
Using library EEPROM at version 1.0.3 in folder: C:\Users\Neo69\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\EEPROM
Using library HTTPClient at version 1.2 in folder: C:\Users\Neo69\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\HTTPClient
Using library WiFiClientSecure at version 1.0 in folder: C:\Users\Neo69\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFiClientSecure
Using library DNSServer at version 1.1.0 in folder: C:\Users\Neo69\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\DNSServer
exit status 1
Error compiling for board ESP32 Dev Module.

here is log output if it helps. and yes I have Aurora sketch working and neomatrix_config file is properly setup. i can run Aurora properly

Aurora hasn’t been ported to the ESP32. This other matrix library adapted some of the Aurora patterns, it may be an easier place to start:

Note some patterns don’t work and have been disabled I think

I’m very interested in more details on this :slight_smile:

As marc merlin already stated above using his gfx libraray i can run aurora patterns on esp32.but i am bit more interested in web interface because i don’t have teensy and don’t think i will get soon.

Oops, I missed that. I always get confused when people say “Aurora” as I think they’re referring to the original sketch Jason Coon wrote, and not the ports of some of the Aurora patterns.

i am sorry if I didn’t stated correctly of course it is not original written by Jason coon. it is amazing piece of art , can’t imagine hard work behind it.

Ok, let’s rewind.

  1. yeah, windows, sigh, that’s harder since it doesn’t support symlinks. You’ll have to physically copy all the files where the symlinks are (you can see them on github). Maybe I’ll do something to add a bunch of includes instead of the symlinks, but windows should really get with the program if they claim to better support linux and open source…

  2. are you currently compiling aurora within the directory I gave you? (seems like not from the list of compilation libraries you show)
    a) please try building just aurora first (the one in my tree that I pointed you to)
    b) more generally the error you pasted is incomplete, it’s probably higher up in your scrollback

he did the same Aurora port to GFX that I did, about a year later, because I guess he didn’t find mine :slight_smile: I didn’t look at his port in details, but we both mostly did the same thing.

I added/copied all files/libraries necessary. the error/compilation log i posted is just a part of compilation log(it’s really long).here i can see either WIFI or IR library is messing up somehow but still need to figure it out. i also added IR32 library and Wi-Fi library you mentioned.

It’s a bit hard to debug this remotely, but as I said, please first trying to get Aurora building and working before you do the full code.
Then, when you do go to the whole code, look at ARDUINOONPC defines, you can use that to disable FastLED (by that I mean NEOPIXEL_PIN), IR, and Wifi (although Wifi should also be disabled if you do not have PSRAM as on my panel, I run out of RAM otherwise, but you might not if your panel is smaller).
Basically when things don’t work, start smaller, get something that works, and then work your way up from there.