# Multi input at the same time

**URL:** <https://wled.discourse.group/t/multi-input-at-the-same-time/4868>\
**Category:** Enhancements\
**Created:** [February 9, 2022, 9:27am UTC](https://wled.discourse.group/t/multi-input-at-the-same-time/4868 "2022-02-09T09:27:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oakey](https://avatars.discourse-cdn.com/v4/letter/o/258eb7/32.png) [@oakey](https://wled.discourse.group/u/oakey)\
**Post date:** [February 9, 2022, 9:27am UTC](https://wled.discourse.group/t/multi-input-at-the-same-time/4868/1 "2022-02-09T09:27:43Z")

</div>

Hey there. Loving the enhancements to date. One thing I’m curious about. We have 4 inputs on the ESP32. I’m trying to setup a system to run indicators on a car. Using An optocoupler setup I am able to get left and right to trigger. But as soon as both ie. the hazards come on, WLED will pick and choose out of left or right. It won’t trigger both presets. I have also played with multiple presets and extra optocouplers to trigger a seperate input when the hazards are on. To no luck. Is there a way that something extra could be put into the code that if say 2 inputs trigger at the same time a different preset can be triggered. I’m thinking this could give a few extra inputs as such without increasing the 4 physical ones. If I worked it out right an extra virtual 6 presets could be triggered. And on top of all the double press and long hold. That’s quite a few input varieties

Cheers

---

<div class="post-metadata">

**Author:** ![blazoncek](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/blazoncek/32/1886_2.png) [@blazoncek](https://wled.discourse.group/u/blazoncek)\
**Post date:** [February 9, 2022, 10:46am UTC](https://wled.discourse.group/t/multi-input-at-the-same-time/4868/2 "2022-02-09T10:46:20Z")

</div>

You can increase maximum number of _buttons_ using -D WLED\_MAX\_BUTTONS=X override in PlatformIO build environment.

---

<div class="post-metadata">

**Author:** ![oakey](https://avatars.discourse-cdn.com/v4/letter/o/258eb7/32.png) [@oakey](https://wled.discourse.group/u/oakey)\
**Post date:** [February 9, 2022, 11:11am UTC](https://wled.discourse.group/t/multi-input-at-the-same-time/4868/3 "2022-02-09T11:11:58Z")

</div>

Yeah ok. Thanks for that. I’ll have a look into that soon. But as for the actual problem. It lies with 2 inputs triggered at the same time. But only one preset lighting up

---

<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:** [February 9, 2022, 1:36pm UTC](https://wled.discourse.group/t/multi-input-at-the-same-time/4868/4 "2022-02-09T13:36:57Z")

</div>

You would have to add that logic yourself.

---

<div class="post-metadata">

**Author:** ![oakey](https://avatars.discourse-cdn.com/v4/letter/o/258eb7/32.png) [@oakey](https://wled.discourse.group/u/oakey)\
**Post date:** [February 9, 2022, 9:17pm UTC](https://wled.discourse.group/t/multi-input-at-the-same-time/4868/5 "2022-02-09T21:17:35Z")

</div>

I’m not really a coding wiz. Would this be in-depth. Or something simple to do.

Thanks
