Adding infrared control to your project is easy. WLED comes preprogrammed to use a variety of common IR remote controls, so you can get instant functionality with just a little bit of setup.
The Sparkle Motion board has an onboard IR sensor on pin 32. It's also not too hard to set up your own IR sensor on the stemma port on GPIO 27, in case you want a more accessible sensor if your board is hidden inside an enclosure or inconveniently located.
Click the LED Preferences tab and scroll down to Hardware Setup.
Change the IR GPIO pin to 32 and select which remote you're using from the dropdown. I like this 44 key remote since it gives me quick full-strip color control as well as plenty of customizable buttons to use with my different presets.
Remote Usage: 44 Key Remote
Change the brightness or turn the strip on and off with the buttons on the top row.
When you have the "solid" effect selected in WLED, the color buttons near the top of the remote will change the colors, making the pixels act like a "dumb" RGB strip.
On my 44-key remote, there are buttons near the bottom labeled "DIY1", "DIY2" etc. WLED will automatically assign your animation presets to these buttons so you can select your favorite presets or playlists. Simply save the presets you want to the first 6 preset slots and the buttons will pull them up.
Head over to the WLED wiki at https://kno.wled.ge/ to delve into all the particulars.
Adding a Wired IR Sensor
Sometimes you want to place your IR sensor further away from your microcontroller to make an easier line-of-sight for the remote control. Here's how to add a wired IR sensor or IR breakout to the Stemma port on the Sparkle Motion board to make this easy. Use GPIO 27 in config.
You'll need an IR sensor and a STEMMA JST 3-pin connector with female sockets. Plug the connector into the smaller of the two Stemma ports. Looking at the sensor with the bump facing you:
- White wire on the left
- Black wire in the middle
- Red wire on the right
You can lengthen the wires as needed so your IR sensor ends up right where you want it.
We also have these handy IR breakout boards available.
Page last edited January 29, 2025
Text editor powered by tinymce.