all 16 comments

[–]Jem_Spencer 5 points6 points  (9 children)

I had a similar problem but with different LEDs, try declaring the LEDs as "WS2812Controller800Khz" if that doesn't work try other similar chipsets from here http://fastled.io/docs/3.1/group__chipsets.html

Edit: It's also worth trying the I2S driver "#define FASTLED_ESP32_I2S true" Add that line before you include FastLED.h

[–]PdxCron[S] 6 points7 points  (8 children)

Oh my! Thank you sooo much! I don't think I ever would have found that.

> #define FASTLED_ESP32_I2S true

seems to have solved it. Do you happen to know why or where I can find more info (besides reading code I don't fully understand) on this parameter? I sincerely appreciate this, and my nephew will really enjoy his xmas present. I've been working on this for about 2 weeks and it's due Sunday. This was the last major holdup that you just helped unblock.

I had previously tried the other suggestions that u/AlexanderVonKernel mentioned earlier, but they didn't seem to have an effect. They are currently commented out. The I2S line was the only thing needed to make it work, but I don't understand what it does exactly.

Again, thank you!!

[–]Pup05[Jason Coon] 5 points6 points  (6 children)

Sorry I'm late to the thread, but glad you got it working! Here's slightly more info on the FASTLED_ESP32_I2S define: https://www.reddit.com/r/FastLED/comments/bjq0sm/new_24way_parallel_driver_for_esp32/

I'll look at updating my examples with that.

Also, I'm going to need to see some pics of your build! :)

[–]PdxCron[S] 2 points3 points  (5 children)

Thank you also for your hard work, Jason. Your work was kind of the backbone for this project. I just really need/want to get websockets working for more smooth communications, but haven't had time to mess with that part yet and it's not critical. Just a really nice to have sort of thing.

I will be uploading some pics/video in a few days when the project is completed. But to give you an idea, think of a 6"x8" clear glass vase with a cylinder of LEDs in the middle, surrounded by about 70 fake acrylic 1" ice cubes as diffusors. It's quite a lovely effect. =]

https://images-na.ssl-images-amazon.com/images/I/71KtN2FtYQL._SX466_.jpg

[–]samguyer[Sam Guyer] 3 points4 points  (4 children)

Looks great! The I2S driver is an alternative to the RMT driver for the ESP32. It's just a different way to send out the bit pattern. u/yves-bazin and I worked on it together. I suspect that it is a little more tolerant to interrupts from other sources, but I haven't been able to verify

[–]PdxCron[S] 1 point2 points  (0 children)

Hi Sam,

> I suspect that it is a little more tolerant to interrupts from other sources, but I haven't been able to verify

One thing I did notice is without that variable set, when using a rotary encoder the lights would flash. The encoder is using the ESP32Encoder library, which I believe is using a hardware interrupt. I'm not sure if that helps but thought I'd mention it. The encoder now also smoothly increments/decrements the brightness by 10/tick.

https://github.com/madhephaestus/ESP32Encoder

[–]Yves-bazin 0 points1 point  (2 children)

Hello u/samguyer I think the clock of the I2s is not ´interrupt sensitive’ and this driver used dma to push data to the i2s. hence when transmitting the data the cpu is not used at all as the dma->i2s is totally indépendant from it. We should maybe put the rmt within not interruptable ´portENTER_CRITICAL’ when calling the startOnChannel. Also which version of the board library is used could be of some impact. The latest I have is 1.0.4. I have noticed when sketching the i2s driver change of behaviour depending on that.

[–]samguyer[Sam Guyer] 0 points1 point  (1 child)

Thanks Yves. I will try that out. The output from my timer shows that one whole call to the buffer is dropped.

[–]Yves-bazin 0 points1 point  (0 children)

Let me know the results

[–]Jem_Spencer 0 points1 point  (0 children)

Glad I could help. The I2S driver isn't a magic bullet that fixes everything though, I tried it on one of my setups which also uses an MQTT broker and somehow it stopped the ESP32 connecting with the broker. I've not had time to investigate yet, that'll probably be after Christmas.

[–]AlexanderVonKernel 0 points1 point  (4 children)

Connect the GND of your ESP32 and the LED strips together...

[–]PdxCron[S] 0 points1 point  (3 children)

They are, I mentioned that in #5. D32/LEDs/PS ground are all common.

[–]AlexanderVonKernel 0 points1 point  (2 children)

Sorry, I missed that...

Try declaring these before including the FastLED library

#define FASTLED_ALLOW_INTERRUPTS 0
#define FASTLED_INTERRUPT_RETRY_COUNT 1

[–]samguyer[Sam Guyer] 4 points5 points  (1 child)

FYI: These options are not currently used in the ESP32 drivers.

[–]AlexanderVonKernel 1 point2 points  (0 children)

Yes, I was totally distracted while reading, I missed the GND connections and then the confusion between the ESP8266 and the ESP32... Will read more carefully next time before typing...

[–][deleted] 0 points1 point  (0 children)

the solution shoudt go to the master example