So first i had the “SoundSensor” void part in void loop but this made the esp8266 constantly disconnect and reconnect. But it did work. Now it seems like nothing is working.
Can anyone spot what i am missing ?
Thanks
I suggest going through the DOCs and getting familiar with BLYNK. You should pay close attention to the “BLYNK Main Operations” Section, as this is key to making BLYNK function correctly.
The PUSH_DATA() Example has everything you need to make your project work. Study it until you Understand it.
Basically, you need to use the BlynkTimer (or SimpleTimer) , and call the SoundSensor function at a timed interval.
Add this before the WidgetLED
BlynkTimer timer;
Add this to your setup function
timer.setInterval(1000L, SoundSensor); // calls SoundSensor Function every 1 second