35 if (!WiFi.isConnected()) {
36 Serial.print(millis());
37 Serial.println(
"Reconnecting to WiFi...");
50 WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
52 FIREBASE_URL, FIREBASE_TOKEN, FIREBASE_USER_EMAIL, FIREBASE_USER_PASSWORD);
59 Serial.println(
"Done setup");
bool is_connected()
Get http server connection status.
void begin(const char *fire_url, const char *fire_token, const char *email, const char *pass)
initialise and authorise system to use Firebase RTDB (real time database) make sure wifi is initialis...
void set_int(const char *path, int64_t value)
Set an integer value.
bool check_and_refresh_token()
refresh token if expired
A scheduler for running tasks on the controller, minimum time between events is 1 second based off th...
void begin(long int timer_sync_interval_ms=600000)
initialise timer
void run()
This needs to be run in the loop function continuously. Best practice is to have a loop function that...
void create_task(void(*task_func)(), unsigned long interval_sec)
Create a task.
void check_and_refresh_firebase_token()