forked from espressif/arduino-esp32
fix some examples
This commit is contained in:
@ -58,7 +58,7 @@ void connectToWiFi(const char * ssid, const char * pwd){
|
||||
//wifi event handler
|
||||
void WiFiEvent(WiFiEvent_t event){
|
||||
switch(event) {
|
||||
case SYSTEM_EVENT_STA_GOT_IP:
|
||||
case ARDUINO_EVENT_WIFI_STA_GOT_IP:
|
||||
//When connected set
|
||||
Serial.print("WiFi connected! IP address: ");
|
||||
Serial.println(WiFi.localIP());
|
||||
@ -67,7 +67,7 @@ void WiFiEvent(WiFiEvent_t event){
|
||||
udp.begin(WiFi.localIP(),udpPort);
|
||||
connected = true;
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_DISCONNECTED:
|
||||
case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:
|
||||
Serial.println("WiFi lost connection");
|
||||
connected = false;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user