GPIO Input = LED OFF + MQTT Message

Hello everyone.

In my project, I have an ESP32 with a custom script running a game. This game randomly activates an output. This output should be sent via MQTT to an ESP8266 with a WLED. The WLED should then turn on the WS2812B (later with a specific color – but that’s not important right now).

I also want to wire a push button to the WLED ESP8266. When this button is pressed, the WLED should turn off the WS2812B and send a message via MQTT to the ESP32.

Is this possible? How do I need to proceed?

Thanks and regards

yes its possible. if you implement the same protocol as WLED sync uses you can use stock WLED and no modification in code needed, just send the sync packet instead of MQTT