# Bendable Sound Reactive Lamp with WLED

## Overview

https://youtu.be/6JT1j1d7QHQ

Check out this [bendable, foldable lamp](https://a.co/d/01uIVJnd) from Decktok. The four movable sections are filled with addressable RGBW lights and can be twisted, folded, or bent into any number of configurations. This is a really cool design!

The lamp ships with an onboard button for color changes, and can be controlled with the Tuya app right out of the box. The app features a number of nice animations, but not a lot of customization options. This guide will explain how to take it to the next level using an Adafruit Sparkle Motion controller. This adds WiFi connectivity and sound reaction using the Sparkle Motion's onboard microphone and the free, open-source WLED control app.

WLED allows you to create endless animations and color palettes, save presets and playlists for your lights, and comes with a number of customizable sound-reactive modes so your lamp can react to the music or ambient sounds in your environment.&nbsp;

This is a very easy project with just a little soldering and no coding. You get amazing control of your lights with just a few minutes' work. Plus, WLED is great at syncing up with other WLED controllers on the same WiFi network -- so you can make your top hat or Christmas tree lights dance in sync with your lamp in just a few clicks.

![](https://cdn-learn.adafruit.com/assets/assets/000/143/443/medium800/adafruit_products_hero.jpg?1775261451)

## Parts
### Adafruit Sparkle Motion - All-In-One WLED and xLights Board

[Adafruit Sparkle Motion - All-In-One WLED and xLights Board](https://www.adafruit.com/product/6100)
The&nbsp; **Adafruit Sparkle Motion&nbsp;** is the flagship in&nbsp;our&nbsp;series of "Sparkle Motion" boards, that are our attempt to make the&nbsp;best small&nbsp;WLED-friendly smart LED driving board in the whole world. Our resident mermaid,&nbsp;<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/6100)
[Related Guides to the Product](https://learn.adafruit.com/products/6100/guides)
![Angled shot of rectangular LED driver PCB with green terminal blocks.](https://cdn-shop.adafruit.com/640x480/6100-07.jpg)

### Adafruit USB Type C Plug Breakout

[Adafruit USB Type C Plug Breakout](https://www.adafruit.com/product/5978)
Throw out all those Mini and Micro B USB cables you have in a plastic bin - the next generation of USB connectors is here with&nbsp; **USB C**! You've seen these connectors pop up on all sorts of devices, as the industry moves from micro B or lightning to the new standard....

In Stock
[Buy Now](https://www.adafruit.com/product/5978)
[Related Guides to the Product](https://learn.adafruit.com/products/5978/guides)
![Angled shot of USB type C breakout.](https://cdn-shop.adafruit.com/640x480/5978-00.jpg)

### Tactile Switch Buttons (12mm square, 6mm tall) x 10 pack

[Tactile Switch Buttons (12mm square, 6mm tall) x 10 pack](https://www.adafruit.com/product/1119)
Medium-sized clicky momentary switches are standard input "buttons" on electronic projects. These work best in a PCB but [can be used on a solderless breadboard as shown in this tutorial](https://learn.adafruit.com/adafruit-arduino-lesson-6-digital-inputs?view=all). The...

In Stock
[Buy Now](https://www.adafruit.com/product/1119)
[Related Guides to the Product](https://learn.adafruit.com/products/1119/guides)
![Angled shot of 10 12mm square tactile switch buttons.](https://cdn-shop.adafruit.com/640x480/1119-03.jpg)

### Part: Silicone Stranded Wire
quantity: 2
Hook up wire for the button - get 2 colors
[Silicone Stranded Wire](https://www.adafruit.com/product/2003)

### Part: Precision Screwdrivers
quantity: 1
Precision screwdriver set (6 pieces)
[Precision Screwdrivers](https://www.adafruit.com/product/424)

### Part: USB-C Cable
quantity: 1
USB-C Cable for programming
[USB-C Cable](https://www.adafruit.com/product/4198)

- or - (depending on your USB ports)

### USB Type A to Type C Cable - approx 1 meter / 3 ft long

[USB Type A to Type C Cable - approx 1 meter / 3 ft long](https://www.adafruit.com/product/4474)
As technology changes and adapts, so does Adafruit. This&nbsp;&nbsp; **USB Type A to Type C** cable will help you with the transition to USB C, even if you're still totin' around a USB Type A hub, computer or laptop.

USB C is the latest industry-standard connector for...

In Stock
[Buy Now](https://www.adafruit.com/product/4474)
[Related Guides to the Product](https://learn.adafruit.com/products/4474/guides)
![Angled shot of a coiled black, USB-C to USB-A cable.](https://cdn-shop.adafruit.com/640x480/4474-02.jpg)

## Tools and Materials

- A medium sized screwdriver
- A soldering iron & accessories
- Hot glue gun

# Bendable Sound Reactive Lamp with WLED

## Wiring Diagram

![](https://cdn-learn.adafruit.com/assets/assets/000/143/434/medium800/adafruit_products_wiring_sparklemotion_usb_button_bb.png?1775255213)

We're using the existing wiring to the LED strip and the power supply, but replacing the controller with the Sparkle Motion board and adding our own pushbutton.

Solder the red and black wire from the lamp's power supply connector to&nbsp; **VBUS** (red) and **GND** (black) on the USB breakout.

Use the three center screw terminal connectors to connect to the three wires from the LED strip that's inside the lamp: black to **G** , yellow to **22** , and red to **+**.

Connect one leg of your button to **18** and one to **G** on the Sparkle Motion. The button won't work if you use the screw terminal data pins -- they are output only.

# Bendable Sound Reactive Lamp with WLED

## WLED Installation

This page will guide you through how to install WLED on the Sparkle Motion board.

The Sparkle Motion has a USB to serial chip which may need a driver installed before you can install WLED. Head over to the&nbsp;[How to Install Drivers for WCH USB to Serial Chips](https://learn.adafruit.com/how-to-install-drivers-for-wch-usb-to-serial-chips)&nbsp;tutorial, and download and install the new driver.

## Install WLED

These next steps require a **_Web Serial_-compatible browser**. As of this writing, that means **Google&nbsp;Chrome** , **Microsoft&nbsp;Edge** or **Opera** &nbsp;“desktop” browsers. Other browsers (Safari, Firefox, Explorer and _anything_ mobile) won’t work.

Visit [https://install.wled.me/](https://install.wled.me/)

Plug your microcontroller into your computer with a known good USB cable. Click "Install" and select the port for your board.

Depending on the USB-to-serial bridge chip on the board, you might see one _or two_ serial ports. On Mac, for instance, there might be both “/dev/cu.usbmodem[number]” _and_ “/dev/cu.wchusbserial[number]”. Use the “ **wchusbserial** ” one.

![adafruit_products_Install_WLED.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/287/medium640/adafruit_products_Install_WLED.jpg?1663802069)

After successful installation, enter your WiFi network name and password when prompted. This must be a **2.4 GHz** WiFi network; ESP32 does not support 5 GHz networks. If it can’t connect, then as a fallback WLED will create its own 2.4 GHz WiFi access point.

![led_strips_Install_WLED.jpg](https://cdn-learn.adafruit.com/assets/assets/000/134/601/medium640/led_strips_Install_WLED.jpg?1737574345)

If you don't see the "Connect to Wi-Fi" prompt, you'll need to set up your WiFi network using AP (access point) mode.&nbsp;Open up your WiFi settings and look for a WiFi network called&nbsp;`WLED-AP`. Connect to this network&nbsp;using the default password&nbsp;`wled1234`. The WLED interface will pop up in its own browser.

From here, go into Config/Wifi Settings and enter your WiFi credentials near the top. Give your project a name in the mDNS field a little further down the page. Now you can type in "projectname.local" (where "projectname" is your mDNS name) into any web browser on the same wifi network to access your microcontroller.

You can also scan the QR code below to open access point mode.&nbsp;

For more help and troubleshooting tips visit the [Getting Started page on the WLED knowledge base.](https://kno.wled.ge/basics/getting-started/)

![led_strips_install_no_wifi.jpg](https://cdn-learn.adafruit.com/assets/assets/000/134/597/medium640/led_strips_install_no_wifi.jpg?1737574050)

![led_strips_WLED_wifi_settings.jpg](https://cdn-learn.adafruit.com/assets/assets/000/134/598/medium640/led_strips_WLED_wifi_settings.jpg?1737574103)

![](https://cdn-learn.adafruit.com/assets/assets/000/134/599/medium800/led_strips_WLED-QR-Connect-WB.png?1737574151)

## Setup & Preferences
### WiFi&nbsp;Setup

Head to the **WiFi Setup** screen under Config and create a good URL so you can control your project from any web-enabled device. Call it something you'll remember, that's easy to type into any web browser on your WiFi network in order to connect to your project.

In Safari or Chrome on your phone or computer, type in this web address to access the WLED interface: [http://projectname.local](http://projectname.local)&nbsp; (where "projectname" is whatever you put into this field).

Check out the Additional Settings page for more info on accessing your project. WLED has an "access point mode" that doesn't require a WiFi network for when you're out on the go. It's also helpful to download one of the WLED apps to help manage and organize your projects.

![adafruit_products_wled_config.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/288/medium640/adafruit_products_wled_config.jpg?1663802411)

![led_strips_adafruit_products_WiFi_Settings_generic.jpg](https://cdn-learn.adafruit.com/assets/assets/000/131/679/medium640/led_strips_adafruit_products_WiFi_Settings_generic.jpg?1722624553)

## LED Setup

Next, head to the&nbsp; **LED Preferences** &nbsp;tab under the&nbsp; **Config menu**.

Scroll down to&nbsp; **Hardware Setup**. This lamp is using RGBW lights, so change the first field to **SK6812/WS2814 RGBW.** &nbsp;

For my lamp, the color order is **BRG** with **Swap: W & G**.&nbsp;

Set Length to **40** and set Data GPIO to **22.** &nbsp;&nbsp;

Once you have all these settings correct your lamp will come on all in a warm yellow color. Once your lamp is connected to the board, if you have any other colors showing, mess around with these controls until you see yellow.

![](https://cdn-learn.adafruit.com/assets/assets/000/143/438/medium640/adafruit_products_LED_Settings-2.jpg?1775256469)

## Brightness Limiter

Scroll up just a bit to find this setting.

This lamp has a 12v 2a power supply, so we can safely limit the brightness to 2A (2000 mA) instead of the default of 850 mA.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/143/439/medium640/adafruit_products_brightness.jpg?1775256739)

## Use It
![adafruit_products_WLED_interface.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/394/medium800/adafruit_products_WLED_interface.jpg?1667150591)

Now you can use any computer or handheld device to control your LEDs.&nbsp;

Make sure your device is on the same WiFi network as your board. Navigate to your custom URL (projectname.local/ ) in a web browser. You'll see a color picker above a whole bunch of color palette choices.

Choose a color, choose an effect, and watch your lights animate and glow!

Save your favorite combinations as presets, create playlists, control the speed and intensity of the animations, and lots more. This web app is incredibly intuitive and easy to use.

Head over to the WLED wiki at [https://kno.wled.ge/](https://kno.wled.ge/) to delve into all the particulars.

## Troubleshooting

_If your lights didn't come on, here are a few things to try:_

1. Head back to WLED and check your pinout configuration under LED Preferences. Be sure the pin number is the correct GPIO for the attachment point you used.
2. Check your wiring! Be sure you connected to the IN end of the LED strip. These strips can be inconsistent so this is a pretty common problem. Use an [alligator clip](https://www.adafruit.com/product/1008) to try connecting the data wire on the other end (the power and ground wires should work from either end).
3. Try re-uploading the WLED software.&nbsp;
4. If the lights come on but you can't control them: i.e. you type in "projectname.local" into your browser and it won't connect, make sure you're on the correct WiFi network. If you're on a different network than the one you set up the sofware on, you won't see the WLED connection.
5. If your lights came on in blue or green instead of yellow, your color order is wrong. See below to fix.
6. If only half your lights came on, be sure you've got the correct number in the "length" field under LED preferences.
7. If your lights came on in a variety of weird colors and looking like a 1950s diner interior, you may have the wrong LED strip type selected. RGBW strips and RGB strips are not the same, so be sure you've got the correct strip type or you'll get very odd behavior.
8. If your microcontroller hangs or keeps rebooting, or gets really hot, you may have the power and ground lines switched. Unplug right away and check: this is a fast way to brick your controller.

# Bendable Sound Reactive Lamp with WLED

## Electronics Assembly

The first step is to take a look at the power supply and find out what we're dealing with in terms of voltage. This power supply provides 12v, so we need a controller that can handle either 5v or 12v input. Using a board that's rated for 5v like most ESP32 boards will not work - your board will fry.&nbsp;

Luckily, Adafruit's got you covered. The Sparkle Motion board can easily handle 12v, and it's almost exactly the same size as the controller that ships with the lamp.&nbsp;

&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/143/426/medium640/adafruit_products_04_powersupply.jpg?1775254124)

![](https://cdn-learn.adafruit.com/assets/assets/000/143/427/medium640/adafruit_products_05_comparison.jpeg?1775254249)

Find the slide switch on your Sparkle Motion controller and set it to the 12v setting.

![](https://cdn-learn.adafruit.com/assets/assets/000/143/428/medium640/adafruit_products_sparklemotion_12v.jpg?1775254498)

Remove the rubber feet from the controller enclosure and unscrew the four screws. Carefully unsolder the five wire connections: red, yellow, and black to the LED strip connector and red and black to the power connector. Remove the controller.&nbsp;

Trim the solder blobs off the wires, while keeping them as long as possible. Strip a tiny bit of shielding off each wire.

![](https://cdn-learn.adafruit.com/assets/assets/000/143/430/medium640/adafruit_products_01_wires.jpeg?1775254765)

![](https://cdn-learn.adafruit.com/assets/assets/000/143/431/medium640/adafruit_products_03_remove.jpeg?1775254952)

Prep your momentary switch by soldering a short wire to each of the two legs on one side. Bend the legs outwards so the button can sit flat on the table. Trim off the other two legs to avoid accidental shorts. Cover the connections with heat shrink.

![](https://cdn-learn.adafruit.com/assets/assets/000/143/432/medium640/adafruit_products_06_switchprep.jpeg?1775255086)

Solder all your connections as shown:&nbsp;

On the side with the power cord:

- Red to USB breakout VBUS
- Black to GND

On the side that goes to the lamp, use the middle 3 screw terminal ports:

- Black to -
- Yellow to 22
- Red to +

For the switch:

- One wire to GND or - (any pin or port will work)
- One wire to pin 18&nbsp;

It's tempting to wire the switch to the screw terminal on pin 19 but the screw terminal pins are output only -- the switch will not work if wired to the screw terminal.

![](https://cdn-learn.adafruit.com/assets/assets/000/143/433/medium640/adafruit_products_07_wired.jpeg?1775255189)

Squeeze a little hot glue into the indentation for the button on the bottom of the enclosure. The button is silicone so the glue won't stick -- this indentation will act as a mold for the glue. Press the top of your button into the wet glue, being careful not to get wet glue into the button mechanism. Now you have a perfectly shaped hot-glue cap for your button that will stay nicely in place inside the enclosure.

![](https://cdn-learn.adafruit.com/assets/assets/000/143/435/medium640/adafruit_products_08_gluedot.jpeg?1775255290)

Now is the time for testing! First, double check that your voltage slider is set to 12v on the Sparkle Motion. Plug the two connectors in to the LEDs and the power supply. Your lights should come on in yellow. Click the button and the lights will cycle through different effects.

If this all happens, great! Move on to the next step to close up the case.&nbsp;

If not, check out the Troubleshooting section at the bottom of the page.

Yellow: When using diagonal cutters below, ensure you have eye protection as tiny bits of plastic don't go well in eyes.

Place your button face down into the enclosure. Plug the USB breakout into the Sparkle Motion and nestle it all down on top of the button.&nbsp;

I used my [flush cutter pliers](https://www.adafruit.com/product/152) to modify the case to make this all fit a little better, cutting out a few of the supports that were in the way of the board.&nbsp;

Replace the strain relief screws on the LED side. The USB breakout is in the way so we can't fix the strain relief screws on the power side. Add a zip tie or some glue if you're worried about the wires getting pulled out.

&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/143/436/medium640/adafruit_products_09_fit.jpeg?1775255416)

Sandwich the back of the case together on top of the Sparkle Motion and click the button a few times to make sure things are still aligned. Replace the four screws to close up the case as much as possible -- the Sparkle Motion is a little too tall to allow the case to close completely so you'll have a gap, but the screws still reach the holes -- it's a little inelegant, but it works!

![](https://cdn-learn.adafruit.com/assets/assets/000/143/437/medium640/adafruit_products_10_sandwich.jpeg?1775255841)

## Troubleshooting

- If your lights come on in a weird white and purple flashing pattern, you have the wrong type of LED strip selected. Head to CONFIG / LED SETTINGS in WLED and change the LED type to SK6812/WS23814 RGBW.
- If your lights come on in white or in any other color that's not yellow, you need to update the color order. Mine are BRG with a W & G swap. See the installation page for more info.
- If only some of the lights come on, check to be sure you have the Length field set correctly -- my lamp has 40 lights.
- If no lights come on, check to be sure you have the right GPIO set up. The middle terminal uses pin 22 -- if you used a different terminal, fix the GPIO number to match.
- If your button doesn't work, check to be sure you set up the button GPIO in LED settings on pin 18, and double check the wiring -- the screw terminal ports won't read button clicks, you need to be connected to G and 18.&nbsp;
- If your button still doesn't work, open the case and make sure it's aligned right. Try clicking the button when it's not in the case and see if that's the problem.

# Bendable Sound Reactive Lamp with WLED

## WLED Audioreactive Setup

The Sparkle Motion comes with an onboard PDM microphone, so adding audio reactivity to your project is easy. Here's how to get it set up.

Click&nbsp; **Config** &nbsp;and then select the&nbsp; **Usermods** &nbsp;tab.

![usermods highlighted in the menu](https://cdn-learn.adafruit.com/assets/assets/000/136/524/medium640/wled_audioreactive_setup_adafruit_products_image.png?1745943834)

Scroll down a bit and you'll find the&nbsp; **AudioReactive** &nbsp;section.&nbsp;

Click the box to enable, then enter the settings and the&nbsp; **Digitalmic** &nbsp;section as follows:

- Type: **Generic I2S**
- Pin I2S SD: **25**
- Pin I2S WS:&nbsp; **33**
- Pin I2S SCK:&nbsp; **26**

The other pins are unused.

Reboot your microcontroller for changes to take effect. That means either pressing the reset button or unplugging the board from power completely for a few seconds.

![](https://cdn-learn.adafruit.com/assets/assets/000/143/440/medium640/adafruit_products_audio.jpg?1775256986)

If you want the audio to work well in both loud and quiet settings, you may want to turn on **AGC** - automatic gain control. Start with **Normal** and then experiment with other options if you want more or less 'gain speed'.

![the AGC menu highlighted](https://cdn-learn.adafruit.com/assets/assets/000/136/525/medium640/wled_audioreactive_setup_adafruit_products_image_%281%29.png?1745944156)

There are a lot of other settings you can adjust in WLED. I found that the default settings for this mic seem to work perfectly, but you can delve into the particulars at [https://kno.wled.ge/advanced/audio-reactive/](https://kno.wled.ge/advanced/audio-reactive/)

To use audio reactive mode, head back to the main interface and select any effect that has a **music note icon** next to the name. You can also search for musical-reactive effects that are built in.

Make some noise and see how your lights react. If it doesn't work, check your pins, try turning on AGC, tapping on the mic, and rebooting (removing power completely, waiting a few seconds then turn back on).

![turning on audio reactive mode on the effect](https://cdn-learn.adafruit.com/assets/assets/000/136/526/medium640/wled_audioreactive_setup_adafruit_products_image_%282%29.png?1745944211)

If you happen to have a 2D matrix as an output, the GEQ effect shows a 'binned' frequency response graph which can be good for debugging!

![the GEQ option in the main menu](https://cdn-learn.adafruit.com/assets/assets/000/136/527/medium640/wled_audioreactive_setup_adafruit_products_image_%283%29.png?1745944285)

![a GEQ output on a 16x16 matrix](https://cdn-learn.adafruit.com/assets/assets/000/136/528/medium640/wled_audioreactive_setup_adafruit_products_IMG_2299.jpg?1745944316)

# Bendable Sound Reactive Lamp with WLED

## Create Presets

### 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.&nbsp;

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.

![](https://cdn-learn.adafruit.com/assets/assets/000/131/540/medium800/led_strips_setup_presets.jpg?1722023074)

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.&nbsp;

## Control Presets

The WLED preset interface can also be used to send control commands to the LED strip. Once you've set up a button or switch, it can be used for a wide variety of control functions: change modes, change brightness, toggle the lights on and off, or a whole host of other features.&nbsp;

Each button function in WLED has 3 options: a short press, a long press, or a double press. I want my lights 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.&nbsp;

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.&nbsp;

![led_strips_presets_next_fx.jpg](https://cdn-learn.adafruit.com/assets/assets/000/131/545/medium640/led_strips_presets_next_fx.jpg?1722024741)

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. I set this to space 11.

![led_strips_soundreactive_toggle.jpg](https://cdn-learn.adafruit.com/assets/assets/000/131/693/medium640/led_strips_soundreactive_toggle.jpg?1722904335)

### Toggle On/Off
To turn the lights on and off, create another preset and call it "Toggle". Uncheck the "use current state" checkbox and enter&nbsp;`T=2` into the API command box. This will tell the LEDs to toggle between on and off. Save this one to ID 10.

![led_strips_presets_toggle.jpg](https://cdn-learn.adafruit.com/assets/assets/000/131/546/medium640/led_strips_presets_toggle.jpg?1722024787)

On the next page, these control presets will be connected to a button.

Find out more about creating these control presets here:&nbsp;

[https://kno.wled.ge/features/presets/](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.&nbsp;

[https://kno.wled.ge/interfaces/json-api/](https://kno.wled.ge/interfaces/json-api/)

# Bendable Sound Reactive Lamp with WLED

## WLED Button Setup

I soldered my button touch wire to pin **18.**

In the LED Settings screen, scroll to the button setup section and set button 1 to use pin 18, with the type set as "Pushbutton".

![](https://cdn-learn.adafruit.com/assets/assets/000/143/441/medium640/adafruit_products_button.jpg?1775257205)

I advise against using button 0. WLED's buttons have some default behaviors written in, and one of button 0's default behaviors is that when it's pressed for more than a few seconds, it resets your microcontroller to factory settings. I originally had button 0 selected, and I held the button down a bit too long while I was sewing it onto the hat, and .. POOF. All my settings and presets were wiped out.&nbsp;

Check out the "Backup" section under the Additonal Settings page to learn to back up your configuration and presets, in case this kind of thing happens to you.

In WLED, the default actions for button 1&nbsp;are designed to provide basic control without custom programming.

**Button 1 Behaviors:**

- **Short Press:** &nbsp;Cycles to the next effect.
- **Long Press:** &nbsp;Ramps brightness up/down.
- **Double Press:** &nbsp;Cycles through color palettes.
- **Default State:** &nbsp;If no custom macro is defined, the button defaults to these built-in functions, as outlined in the&nbsp;[WLED documentation](https://kno.wled.ge/features/macros/).&nbsp;

If you're happy with this, you're done! But if you want to take control of your button to do custom actions of your choosing, read on.

Head to the **Time & Macros** config screen. Scroll down to the Button actions area.&nbsp;

For button 1, enter the number assigned to the control presets you made on the last page. My Next\_FX preset is number 9, so I entered 9 under "short press", and my Toggle preset is number 10 so I've got that set up as a "long press".&nbsp;

I also added the toggle mode that toggles between playlists to preset 11, so a double-click of my button will turn sound reactive mode on or off, since one of my playlists has sound reactive effects and the other doesn't.

![led_strips_macros.jpg](https://cdn-learn.adafruit.com/assets/assets/000/131/542/medium640/led_strips_macros.jpg?1722023424)

![](https://cdn-learn.adafruit.com/assets/assets/000/143/456/medium640/adafruit_products_Time_Settings.jpg?1775509098)

## Troubleshooting

If your button isn't working, here are some things to try:

1. Double check both the LED preferences page and the Time & Macros page to be sure your settings are correct, and have saved.
2. Be sure your presets are correctly numbered. WLED gets confused if the presets have non-sequential IDs (so make sure they're numbered 1, 2, 3 rather than 2, 5, 7).
3. Be sure you're soldered to pin 18 on the Sparkle Motion -- the screw terminal pins will not read button presses.


## Featured Products

### Adafruit Sparkle Motion - All-In-One WLED and xLights Board

[Adafruit Sparkle Motion - All-In-One WLED and xLights Board](https://www.adafruit.com/product/6100)
The&nbsp; **Adafruit Sparkle Motion&nbsp;** is the flagship in&nbsp;our&nbsp;series of "Sparkle Motion" boards, that are our attempt to make the&nbsp;best small&nbsp;WLED-friendly smart LED driving board in the whole world. Our resident mermaid,&nbsp;<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/6100)
[Related Guides to the Product](https://learn.adafruit.com/products/6100/guides)
### Adafruit USB Type C Plug Breakout

[Adafruit USB Type C Plug Breakout](https://www.adafruit.com/product/5978)
Throw out all those Mini and Micro B USB cables you have in a plastic bin - the next generation of USB connectors is here with&nbsp; **USB C**! You've seen these connectors pop up on all sorts of devices, as the industry moves from micro B or lightning to the new standard....

In Stock
[Buy Now](https://www.adafruit.com/product/5978)
[Related Guides to the Product](https://learn.adafruit.com/products/5978/guides)
### Tactile Switch Buttons (12mm square, 6mm tall) x 10 pack

[Tactile Switch Buttons (12mm square, 6mm tall) x 10 pack](https://www.adafruit.com/product/1119)
Medium-sized clicky momentary switches are standard input "buttons" on electronic projects. These work best in a PCB but [can be used on a solderless breadboard as shown in this tutorial](https://learn.adafruit.com/adafruit-arduino-lesson-6-digital-inputs?view=all). The...

In Stock
[Buy Now](https://www.adafruit.com/product/1119)
[Related Guides to the Product](https://learn.adafruit.com/products/1119/guides)
### Silicone Cover Stranded-Core Wire - 2m 30AWG Black

[Silicone Cover Stranded-Core Wire - 2m 30AWG Black](https://www.adafruit.com/product/2003)
Silicone-sheathing wire is super-flexible and soft, and its also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps out. We like this wire for being extremely supple and flexible, so it is great for wearables or projects where the wire-harness has to...

In Stock
[Buy Now](https://www.adafruit.com/product/2003)
[Related Guides to the Product](https://learn.adafruit.com/products/2003/guides)
### Precision screwdriver set (6 pieces)

[Precision screwdriver set (6 pieces)](https://www.adafruit.com/product/424)
Break seals! Void warranties! With this handy screwdriver set at your hands, all hardware you touch will open up and reveal their secret innards.  
  
This set contains 6 screwdrivers, 3 Phillips (#1, #0 and #00) and 3 flat (2.4mm, 1.8mm and 1.4mm). These sizes will open up pretty much...

In Stock
[Buy Now](https://www.adafruit.com/product/424)
[Related Guides to the Product](https://learn.adafruit.com/products/424/guides)
### USB C to USB C Cable - USB 3.1 Gen 4 with E-Mark - 6" long

[USB C to USB C Cable - USB 3.1 Gen 4 with E-Mark - 6" long](https://www.adafruit.com/product/4198)
As technology changes and adapts, so does Adafruit! Rather than the regular USB A, this cable has&nbsp; **USB C to USB C** &nbsp;plugs!

USB C is the latest industry-standard connector for transmitting data&nbsp;_and_&nbsp;power. Like Lightning and MagSafe cables, USB C...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4198)
[Related Guides to the Product](https://learn.adafruit.com/products/4198/guides)
### USB Type A to Type C Cable - approx 1 meter / 3 ft long

[USB Type A to Type C Cable - approx 1 meter / 3 ft long](https://www.adafruit.com/product/4474)
As technology changes and adapts, so does Adafruit. This&nbsp;&nbsp; **USB Type A to Type C** cable will help you with the transition to USB C, even if you're still totin' around a USB Type A hub, computer or laptop.

USB C is the latest industry-standard connector for...

In Stock
[Buy Now](https://www.adafruit.com/product/4474)
[Related Guides to the Product](https://learn.adafruit.com/products/4474/guides)

## Related Guides

- [Adafruit Sparkle Motion](https://learn.adafruit.com/adafruit-sparkle-motion.md)
- [USB C Dock](https://learn.adafruit.com/usb-c-dock.md)
- [Sparkle Motion Dance Shoes](https://learn.adafruit.com/sparkle-motion-dance-shoes.md)
- [Sound Reactive LED Top Hat](https://learn.adafruit.com/sound-reactive-led-top-hat.md)
- [Adafruit TCS3430 / TCS34303 Ambient Tri-Stimulus Color Sensor](https://learn.adafruit.com/adafruit-tcs3430-tcs34303-ambient-tri-stimulus-color-sensor.md)
- [Adafruit Feather 32u4 FONA](https://learn.adafruit.com/adafruit-feather-32u4-fona.md)
- [Rumi Sword - KPop Demon Hunters](https://learn.adafruit.com/rumi-sword.md)
- [Ever-Burning Flame Painting](https://learn.adafruit.com/ever-burning-flame-painting.md)
- [Adafruit MENTA Kit](https://learn.adafruit.com/adafruit-menta-kit-mint-tin-arduino-compatible.md)
- [Adafruit INA219 Current Sensor Breakout](https://learn.adafruit.com/adafruit-ina219-current-sensor-breakout.md)
- [Adafruit AirLift Shield - ESP32 WiFi Co-Processor](https://learn.adafruit.com/adafruit-airlift-shield-esp32-wifi-co-processor.md)
- [NeoPixel Infinity Cube](https://learn.adafruit.com/neopixel-infinity-cube.md)
- [Weather Wise Wifi Umbrella Stand](https://learn.adafruit.com/weather-wise-wifi-umbrella-stand.md)
- [Laser-Cut Layered LED Art Panel (Wood + Acrylic) with WLED](https://learn.adafruit.com/laser-cut-layered-led-art-panel-wood-acrylic-with-wled.md)
- [Pi Hole Ad Blocker with Pi Zero W](https://learn.adafruit.com/pi-hole-ad-blocker-with-pi-zero-w.md)
- [ADXL345 Digital Accelerometer](https://learn.adafruit.com/adxl345-digital-accelerometer.md)
