Virtual momentary button output

Hi all, I’m new to WLED and think it’s a great project. Especially the sound reactive mod.
I wanted to know if there is a way for WLED on ESP32 dev board to trigger a GPIO pin to act as a momentary button. I want to use a PIR sensor to activate a preset and also trigger an external mp3 player to play using a momentary button output from my ESP32.
How to do the button output in WLED?

Yes, that is available as standard feature.
For enhanced functionality, there is a PIR usermod.

Thanks but is there a tutorial about the momentary output?
I can’t seem to understand how I would get the GPIO to fire on then off (momentary GND activation) as a preset.
Toggle feature seems to only acts like a latching button.

Button is for input.
Relay for output.

Relays have a Multi Relay usermod. Both available.
Info in KB.

so I should use a relay to act as a momentary button to my external mp3 player?
BTW, I’m using WLED as as standalone device (no wifi).

Button is for input.
Relay for output.

I don’t believe there is an easy solution for what you’re trying to do. You want a PIR input to trigger a momentary change on a GPIO pin, and everything WLED has in regards to relays is “sticky” meaning it’s just change to on or change to off. You may be able to do it by having the PIR activate a playlist in which the playlist is a relay command to turn on, then a relay command to turn off? I believe that requires installing the Multi-Relay usermod as mentioned.

I have no idea your technical ability, but the best solution may be to add another device to your setup. Adding another ESP (or an arduino) would let you stage multiple actions without needing to mess with WLED. Attach the PIR to that second device, and then when it is triggered it can toggle a GPIO to be your momentary button, and send a command to the WLED ESP through serial to start the preset.

Thanks for the update. I understand that I could use an ardunio tiny or RP2040 pico to do virtual button but I’m looking to do a self contained (no wifi and battery operated) project so space and power are limited. Was hoping that WLED on a ESP32 could do everything I wanted.

Look at the multirelay usermod… May work. May not.