I’m building a 4-channel lighting controller for my living room — four separate dimmable ceiling lights on one ESP32 with rbdimmer 4CH module.
Basic on/off and set-to-level works fine for all four channels. The problem is I want each channel to run independent fade animations simultaneously. For example:
- Channel 1: slow fade up over 5 seconds
- Channel 2: slow fade down over 3 seconds
- Channel 3: hold at 80%
- Channel 4: pulse effect (fade up then down in a loop)
All running at the same time without blocking each other.
My setup:
- ESP32 DevKit V1
- rbdimmer 4CH 4A module
- rbdimmerESP32 library
- Arduino IDE 2.3
I know delay() is out — it blocks the entire loop. What’s the best approach for independent multi-channel fades?
I can think of three options:
- millis()-based timer with a state machine per channel
- FreeRTOS tasks — one task per channel
- DimmerLink with sequential I2C commands
Anyone tried any of these? I’d like to hear what works in practice before I start coding.