mirror of
https://github.com/0015/ThatProject.git
synced 2026-01-12 09:17:42 +03:00
ESP32 | Cloud Firestore Project, Network Class Updated
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
*/
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
// 05-06-2024
|
||||
// Code Updated - Network Class
|
||||
// Tested ESP32 Version - 2.0.16
|
||||
|
||||
#include "DHTesp.h" // Click here to get the library: http://librarymanager/All#DHTesp
|
||||
#include <Ticker.h>
|
||||
#include "Display.h"
|
||||
|
||||
@@ -31,14 +31,14 @@ void WiFiEventDisconnected(WiFiEvent_t event, WiFiEventInfo_t info){
|
||||
}
|
||||
|
||||
void FirestoreTokenStatusCallback(TokenInfo info){
|
||||
Serial.printf("Token Info: type = %s, status = %s\n", getTokenType(info).c_str(), getTokenStatus(info).c_str());
|
||||
Serial.printf("Token Info: type = %s, status = %s\n", getTokenType(info), getTokenStatus(info));
|
||||
}
|
||||
|
||||
void Network::initWiFi(){
|
||||
WiFi.disconnect();
|
||||
WiFi.onEvent(WiFiEventConnected, SYSTEM_EVENT_STA_CONNECTED);
|
||||
WiFi.onEvent(WiFiEventGotIP, SYSTEM_EVENT_STA_GOT_IP);
|
||||
WiFi.onEvent(WiFiEventDisconnected, SYSTEM_EVENT_STA_DISCONNECTED);
|
||||
WiFi.onEvent(WiFiEventConnected, ARDUINO_EVENT_WIFI_STA_CONNECTED);
|
||||
WiFi.onEvent(WiFiEventGotIP, ARDUINO_EVENT_WIFI_STA_GOT_IP);
|
||||
WiFi.onEvent(WiFiEventDisconnected, ARDUINO_EVENT_WIFI_STA_DISCONNECTED);
|
||||
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user