r/FastLED • u/patrickloibl • Mar 02 '24
Support Ensuring ESP32 Uses RMT Module for WS2812 LEDs and Addressing Bit-Banging Warning
Hello everyone,
I'm working on a project involving driving WS2815 LEDs with an ESP32. I've learned about the ESP32's "Remote Control" (RMT) module, optimized for precise timing tasks like controlling WS2815 LEDs. My goal is to leverage the RMT module for optimal performance and stability.
However, while programming, I encountered a warning indicating that bitbanging is being used instead of the RMT module. The exact warning message I receive is: "No hardware SPI pins defined. All SPI access will default to bitbanged output"
This has raised a few questions and concerns for me:
- How can I ensure or verify that my setup is utilizing the RMT module instead of falling back on bitbanging for driving the WS2815 LEDs? Are there specific libraries or code snippets recommended to guarantee the use of the RMT module?
- Is DMA being used in conjunction with the RMT module, and if not, how can I enable it for even smoother operations?
- Is there a way to address or suppress this warning by explicitly configuring my code to use the RMT module for LED control?
- How many WS2815 LEDs can realistically be driven per output if I plan to use 4 separate outputs with the RMT module on an ESP32?
- Given the ESP32 typically has only 2 DMA channels, what happens if I create 4 FastLED outputs with RMT channels? How does this affect performance or configuration? I think the ESP32 has 8 RMT Channels, so only DMA Channels should be the bottleneck or?
- What are the experiences of other users with controlling a large number of WS2812 LEDs across multiple outputs? How many pixels were you able to manage, and what were the challenges or limitations encountered?
I'm seeking advice or examples from anyone who has navigated this issue or has insights into effectively utilizing the RMT module for WS2815 LED control on the ESP32.
Thank you in advance for your help and guidance!
3
u/Jem_Spencer Mar 02 '24
I'm pretty sure that the SPI warning is out of date and that the library automatically drives up to 8 strips of LEDs in parallel, at least with a classic ESP32.
Look in my profile for my spin room posts, 22k WS2815s driven by 8 ESP32s over Art-net. Patterns are generated by a teensy 4.1
1
u/Yves-bazin Mar 05 '24
Hello I would reduce the number of leds per pin. With 640 leds it will take, just to refresh the board, 19ms (52fps) I would advice to have an fps between 70/90 by adjusting the number of leds per pin accordingly if the physical lay out of the build allows it. It will give more time for doing other things on the esp. how many leds do you plan on driving ? (If you can say)
1
u/UrbanPugEsq Mar 02 '24
I have no idea but that message, if it is the same message I get, is a compiler warning and does not mean that is what’s happening at runtime.
1
u/UrbanPugEsq Mar 02 '24
Also, people are generally able to control somewhere in the neighborhood of 600-1800 lights per esp32 pin with frame rate going down as the number of lights goes up.