ESP8266 + sound sensor
ESP32 + WS2812 LED strip
The current idea is that whenever the microphone's sound treshold hits, it will send an API call to WLED to turn off my LED strip. Thing is, the two devices must be about 10meters from each other, and they absolutely must be wireless. I wanna use ESP-NOW protocol to link up the two ESPs.
Pseudo code:
if sound treshold hits:
send API call to WLED
else:
do nothing
I'm kind of new to programming and I just lack the understanding of the sequence/order of things, that's the second crucial thing I'm missing, and the last missing piece, is gonna be the actual programming and I have 2 weeks to figure out the code. There are a few things I don't understand and I'd appreciate some help. Now let's say I'm using ESP-NOW protocol to link up the two ESPs, ESP8266 is set to Master and ESP32 is set to Slave. They are already linked up, and ready to go, but what do I do next?
when the sound treshold hits, how do I make it so that the ESP8266 sends this HTTP API call command over to ESP32 and then to WLED so that it could be executed there?
I really need some hints and pointers, I don't understand what executes where.
1. Does the HTTP API call ultimately execute inside WLED or inside ESP32?
2. I'm using ESP-NOW, but ESP-NOW can't affect WLED, you have to send an API call anyway, right?