Animation Presets
Once your lights are working, it's time for the fun part: creating light animations using WLED presets. This is easy and intuitive in WLED. Choose a color palette and an effect, then play with the sliders at the bottom of the Effect Mode column to customize the effect.
When you find something you like, click the +Preset button in the Presets tab and give your preset a name, then save it. You can reorder them using the "Save to ID" field.
You can create hundreds of presets using the preprogrammed effects, so take some time to play around and see what looks good on your LED strip.
Create at least 3 presets, and be sure they are saved to ID numbers 1-3. Our next step will be to set up the switch to toggle between these presets.
Control Presets
The WLED preset interface can also be used to send control commands to the LED strip. The switch can be used for a wide variety of functions: change modes, change brightness, toggle the lights on and off, or a whole host of other features.
Each button in WLED has 3 options: a short press, a long press, or a double press. I want my lamp to cycle through presets with a short press, and to turn on or off with a long press. Here's how I set up a control preset for each of these features.
Cycle through Presets
Click +Preset and then uncheck the "Use current state" checkbox. This will open up an API command window within the preset module.
Call the effect "Next_FX" and type {"ps":"1~3~"} into the API command box. This tells WLED to cycle through presets 1-3. If you'd like to cycle through more presets, change the 3 to the number of presets you have.
Be sure your preset IDs include all the numbers -- skipping a number will break this command.
Give your preset an ID number that's above the range of your preset numbers -- I called mine 9.
It's also possible to cycle between playlists. I made a playlist of sound reactive effects and a separate playlist of "standard" effects. I set up a preset that toggles between the two playlists -- effectively turning "sound reactive" mode on and off.
Toggle On/Off
Create another preset and call it "Toggle". Uncheck the "use current state" checkbox and enter T=2 into the API command box. This will tell the LEDs to toggle between on and off. Save this one to ID 10.
On the next page we'll connect these control presets to our button.
Find out more about creating these control presets here:
https://kno.wled.ge/features/presets/
You can enter either JSON commands or HTTP commands into this command box, giving you a lot of control over your WLED project.
Text editor powered by tinymce.