Control RGB LED Strips with an Arduino
Read Time:1 Minute, 20 Second

As discussed in Controlling LED Strips – The easy way (Part 1), I need to control at least 7 different RGB LED Strips with an Arduino. Options with PWM or pre-built WiFi modules were a bit to long / costly. So why don’t we use the IR modules that comes with the strips ?

Once the IR controller are modified as discussed in Part 1, you can plug them to any of the Arduino’s IOs. On my side, I only connected a single channel test module like this :
Arduino GND –> IR Controller GND
Arduino IO 13 –> IR Controller IN Signal

The Code

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec Here is an example of the code required once the library is installed.

That’s it ! We can now control as many RGB LED strips we want with an Arduino without having to deal with the different modes nor consuming CPU time for this task.

The LedStripController can be found in my GitLab Repository , it also include a small example and the IR codes for 24 keys remote and 44 keys. Take a look at the README to know where you should drop the files.

What's next ?

Regarding the part 3 to control them, I’ll add examples to control them over MQTT with an ESP device. Once done, it’ll be possible to control all of them within Home Assistant or anything connected to the same MQTT stack.

One thought on “Control RGB LED Strips with Arduino – The Code”

Comments are closed.