# Usage of touch button unclear / not working

**URL:** <https://wled.discourse.group/t/usage-of-touch-button-unclear-not-working/3329>\
**Category:** Uncategorized\
**Created:** [August 5, 2021, 6:38am UTC](https://wled.discourse.group/t/usage-of-touch-button-unclear-not-working/3329 "2021-08-05T06:38:13Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![muhackl](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@muhackl](https://wled.discourse.group/u/muhackl)\
**Post date:** [August 5, 2021, 6:38am UTC](https://wled.discourse.group/t/usage-of-touch-button-unclear-not-working/3329/1 "2021-08-05T06:38:13Z")

</div>

HI there,  
I’m using a 8266 Wemos D1 Mini and a WS2812B RGB LED ring with 12 LEDs - and version 0.13.0 b2 of WLED as it supports touch buttons. Sort of.  
I’ using those: [ANGEEK 10 Pcs TTP223 Capacitive Touch Switch Button Self-Lock Capacitive Swit](https://www.amazon.de/gp/product/B07WH722L1/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1)

I connected one to 3V VCC, GND and D3 (GPIO0) directly.  
The LED ring ist connected to 5V, GND and D4.

In the settings, I chose “touch” as button and put 3 favorites to “button actions” of button 0.

Set up like this, the D1 won’t even boot correctly. There are two LEDs glowing as a status indicator and the D1 won’t connect to the Wifi or boot up correctly.  
If I unplug the data connection of the touch button and reconnect the D1 to power, it boots up correctly.  
If I then put back the data connection to D3, the button somehow works but the LEDs won’t behave like supposed - see “favorites”.  
If I choose “Push inverted” for the kind of button, it totally works as intended. Every press (long, short, double) results in the correct favorite.

BUT: Resetting the D1 or dis- and reconnecting it to power still results in NOT powering up. I always have to do the thing with unplugging and replugging the data cable of the touch button.

I suppose it’s something with high and low of the button but could you please help me find a solution?  
Many thanks and best regards  
Muhackl

---

<div class="post-metadata">

**Author:** ![tonyno](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/tonyno/32/242_2.png) [@tonyno](https://wled.discourse.group/u/tonyno)\
**Post date:** [August 5, 2021, 12:39pm UTC](https://wled.discourse.group/t/usage-of-touch-button-unclear-not-working/3329/2 "2021-08-05T12:39:09Z")

</div>

“Touch” refers to the ESP pins called out for that.

You may need a pull-up resistor for that data line.

---

<div class="post-metadata">

**Author:** ![muhackl](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@muhackl](https://wled.discourse.group/u/muhackl)\
**Post date:** [August 5, 2021, 12:55pm UTC](https://wled.discourse.group/t/usage-of-touch-button-unclear-not-working/3329/3 "2021-08-05T12:55:51Z")

</div>

@tonyno Thanks.  
I’m relatively new to this topic. So this would be 10 kOhm between Data and GND of the touch-button?

---

<div class="post-metadata">

**Author:** ![tonyno](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/tonyno/32/242_2.png) [@tonyno](https://wled.discourse.group/u/tonyno)\
**Post date:** [August 5, 2021, 12:57pm UTC](https://wled.discourse.group/t/usage-of-touch-button-unclear-not-working/3329/4 "2021-08-05T12:57:13Z")

</div>

That would be a pull-down.

ESP pin and 3.3V for pull-up.

---

<div class="post-metadata">

**Author:** ![muhackl](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@muhackl](https://wled.discourse.group/u/muhackl)\
**Post date:** [August 5, 2021, 8:26pm UTC](https://wled.discourse.group/t/usage-of-touch-button-unclear-not-working/3329/5 "2021-08-05T20:26:24Z")

</div>

What do you mean with ESP pin? Between the data pin (D3) of the touch button and the 3.3 V power supply - 10 kOhm ?

---

<div class="post-metadata">

**Author:** ![tonyno](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/tonyno/32/242_2.png) [@tonyno](https://wled.discourse.group/u/tonyno)\
**Post date:** [August 5, 2021, 9:54pm UTC](https://wled.discourse.group/t/usage-of-touch-button-unclear-not-working/3329/6 "2021-08-05T21:54:22Z")

</div>

Yes, GPIO0 in your example.

---

<div class="post-metadata">

**Author:** ![muhackl](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@muhackl](https://wled.discourse.group/u/muhackl)\
**Post date:** [August 6, 2021, 6:53am UTC](https://wled.discourse.group/t/usage-of-touch-button-unclear-not-working/3329/7 "2021-08-06T06:53:59Z")

</div>

Unfortunately, that did not work.  
What I tried:

- Soldering 10kOhm from 3,3V to D3 (GPIO0). D1 not booting up. 2 LEDs on the ring glowing white.
- Soldering 10kOhm from 3,3V to D4 - the data of touch button. D1 not booting up. 2 LEDs on the ring glowing white.

What am I missing?

---

<div class="post-metadata">

**Author:** ![Artacus](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/artacus/32/1258_2.png) [@Artacus](https://wled.discourse.group/u/Artacus)\
**Post date:** [August 9, 2021, 12:09pm UTC](https://wled.discourse.group/t/usage-of-touch-button-unclear-not-working/3329/8 "2021-08-09T12:09:56Z")

</div>

Why not just use esp32 instead? The esp32 boards have up to 10 pins that have capacitive touch baked in. No need for resistors or separate touch buttons, just run a wire to a metal washer or foil on the back of a pieces off glass.

---

<div class="post-metadata">

**Author:** ![muhackl](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@muhackl](https://wled.discourse.group/u/muhackl)\
**Post date:** [August 9, 2021, 1:20pm UTC](https://wled.discourse.group/t/usage-of-touch-button-unclear-not-working/3329/9 "2021-08-09T13:20:36Z")

</div>

I love the D1 mini, because I can fit them totally everywhere. I already have plenty of them so…  
Same with those touch buttons.  
So the question stays the same: what am I doing wrong with this pull-up-resistor?

---

<div class="post-metadata">

**Author:** ![Austin1990](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/austin1990/32/1654_2.png) [@Austin1990](https://wled.discourse.group/u/Austin1990)\
**Post date:** [August 10, 2021, 10:20pm UTC](https://wled.discourse.group/t/usage-of-touch-button-unclear-not-working/3329/10 "2021-08-10T22:20:35Z")

</div>

There are probably a couple of things here.

The touch button you are using outputs a TTL level signal, so don’t configure it as a touch button, but a normal button. You also don’t need any pullup or pull down resistors.

Also, have you set the A & B links of the button?

If not, the switch output without detecting a touch will be low and on the model of Wemos D1 that you are using, holding GPIO0 low at power up could be putting it into flash mode. Hence why it does not boot with the switch connected.

Try setting the A & B links on the switch to change the polarity so that it is high without detecting a touch.

AB=10: no-lock low TTL level output;

---

<div class="post-metadata">

**Author:** ![muhackl](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@muhackl](https://wled.discourse.group/u/muhackl)\
**Post date:** [August 11, 2021, 6:23am UTC](https://wled.discourse.group/t/usage-of-touch-button-unclear-not-working/3329/11 "2021-08-11T06:23:42Z")

</div>

@Austin1990 that did the trick! Never noticed before, that there are links/“jumpers” on that button. Shame.  
Thanks a lot! It’s working now.
