BLYNK
BLYNK.IO       πŸ“² GETTING STARTED       πŸ“— DOCS       ❓HELP CENTER       πŸ‘‰ SKETCH BUILDER

Blynk 2.0 I Need to on buzzer after esp32 connected to the wifi

Dear Blynk Team
i attached here the pictures for your Refrence
previous i am using old version blynk everthing working perfect , what i need is when the wifi connected to esp32 on that time my buzzer will high couple of times, this funtion working fine on my Blynk legency, now that same code i apply to Blynk.Egent it will work but when i power on my ESP32 on that time the buzzzer will trigering couple of times but i dont want like i want when my Esp32 connected to the wifi on that time i want to on buzzer couple of times, can i know please where i need to put my code exactly on Blynk 2.0?

i hope you hear me soon ,

Best regards
Maaz

Placing any code inside setup will run once when the device reboots.

Your explanation n your code are contradictory.

There is no code that detects the wifi connection. As Edgent.begin is a blocking statement, it may stop there n proceed to the next line. But this is not the way you should be doing.

Write a code that checks the connection n beeps.

Search for wifi reconnection in the forum. And add your code to it. Do not use delays.

EDIT:
https://github.com/rotarucosminleonard/Blynk-ESP8266_OfflineTask_Reconnect/blob/master/Blynk-ESP8266_OfflineTask_Reconnect.ino

Go through the code, you will get an idea.

You can use blynk.connected which returns true when hardware is connected to Blynk Server, false if there is no active connection to Blynk server.
https://docs.blynk.io/en/blynk.edgent/api/connection-management#blynk.connected

Dear Sir
thank you from the bottom of my heart I will try that

Best regards
Maaz

Dear sir
thank you from the bottom of my heart I will try that

Best regards
Maaz

Dear sir

thanks you from the bottom of my heart it was working very well thank you
for new user i attached her the example you have to write before void setup
thank you
BLYNK_CONNECTED() {

// Your code here

}

best regards
Maaz