I just finished some major improvements to the ESP32 support for FastLED.

fastled-announce
gplus
(Sam Guyer) #1

I just finished some major improvements to the ESP32 support for FastLED. It should handle up to 8 strips now (the maximum for the RMT peripheral) with no problem. I still have not implemented fully parallel output, but my new changes should make it trivial. You can try it out on my branch of FastLED: https://github.com/samguyer/FastLED

Please let me know if you have any suggestions, problems, successes, questions, etc.

(Sam Guyer) #2

Also: you can now run FastLED.show() on core 0, leaving core 1 for the WiFi and your other logic. Ping me if you want example code (this capability is not built into FastLED).

(Jeremy Spencer) #3

Thanks @Sam_Guyer . Is the RMT peripheral connected to specific pins? Could you let me have example setup code for 8 strips?

(Yves BAZIN) #4

@Sam_Guyer cool !! I will test this ASAP.

(Ben Delarre) #5

Can this be run on the esp-idf freertos framework without the Arduino core or is this Arduino only?

(Mark Kriegsman) #6

Thank you, @Sam_Guyer ! Great stuff!

(Sam Guyer) #7

@Jeremy_Spencer : You can choose the pins, just like other platforms (the ESP32 has some sort of MUX in there).

(Sam Guyer) #8

@Ben_Delarre : I am only relying on code in the esp-idf framework, so it should work without the Arduino wrapper. I think a few people have used it with the platformio system.

(chad steinglass) #9

@Sam_Guyer Thanks Sam! Will definitely be using this soon. I seem to always be hungry for more pixels and higher frame rates :slight_smile:

And definitely would be interested in either an example or some coaching on designating the core for FastLED.show() as well as designating pins - idea being to be able to drive 8 outputs while keeping the pins free that I’d need to read an SD card. Was going to work with Yves on this too as soon as I get some free time

(Marc MERLIN) #10

This is great, thank you. Indeed ESP32’s RMT support makes clock-less strip support pretty trivial, and it’s great to read that you are very close to having parallel output support, which would make the ESP32 a good placement for teensy v3 if you need parallel output and higher frame rates.

(Sam Guyer) #11

@chad_steinglass : I have a version of the FastLED “Demo reel100” that spins off a special task on core 0 to do the showing. I don’t think you need to worry about pins – the six pins that are used for reading SD cards cannot be used for anything else anyway.

(chad steinglass) #12

@Sam_Guyer Thanks Sam :slight_smile: Though I didn’t see an updated demo reel file on your Github? perhaps Just user error and I’m looking in the wrong place. No rush at all as I have several project plans in my queue before I think I’ll crack the upper limit of the 8266 and will need to graduate to the ESP32!

(Sam Guyer) #13

@chad_steinglass I just added a new example directory called “DemoReelESP32” with the code for running FastLED.show() on a separate core.

(chad steinglass) #14

@Sam_Guyer Awesome! Thanks a ton

(Marc Miller) #15

Great stuff @Sam_Guyer !

(Jason Coon) #16

Thank you for the DemoReelESP32 example, @Sam_Guyer ! I was having a hard time getting anything running on my Wemos Lolin32 v1.0.0. Even the most basic sketches were constantly resetting with “Guru Meditation Error: Core 0 panic’ed (Interrupt wdt timeout on CPU1)”. Your example is running perfectly so far. Thanks!

(Hart Welles) #17

@Sam_Guyer Yes thank you for that example, it works flawlessly! Having lots of fun with this incredible microcontroller :slight_smile:

(Jeremy Spencer) #18

@Sam_Guyer , getting this error randomly and infrequently…

/Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/./tasks.c:4837 (xTaskNotify)- assert failed!
abort() was called at PC 0x40086a14 on core 0

Backtrace: 0x40088180:0x3ffdf6f0 0x4008827f:0x3ffdf710 0x40086a14:0x3ffdf730 0x400d2129:0x3ffdf750

Rebooting…
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:956
load:0x40078000,len:0
load:0x40078000,len:13076
entry 0x40078a58
Listing directory: /
FILE: /css/styles.css SIZE: 31
FILE: /favicon.ico SIZE: 4286
FILE: /images/atom196.png SIZE: 5469
FILE: /index.htm SIZE: 10696
FILE: /js/app.js SIZE: 12968
Connecting to *******
HTTP server started
Main code running on core 1

(Sam Guyer) #19

@Jeremy_Spencer Grab my latest version. I realized that the timeout on the fastled task was set too short.

(Sam Guyer) #20

@Jeremy_Spencer The latest version of the example, that is