UPDATED ESP32 CODE CODE CODE CODE
#include <Arduino.h> #include <WiFi.h> #include <FirebaseESP32.h> // Provide the token generation process info. #include <addons/TokenHelper.h> // Provide the RTDB payload printing info and other helper functions. #include <addons/RTDBHelper.h> /* 1. Define the WiFi credentials */ #define WIFI_SSID "Galaxy M126967" #define WIFI_PASSWORD "raji1234" /* 2. Define the API Key */ #define API_KEY "26Sg2a5KBO7macmeRxeJKnUMw0GJlYbkQHIYGAog" /* 3. Define the RTDB URL */ #define DATABASE_URL "https://iot-enabled-energy-meter-default-rtdb.asia-southeast1.firebasedatabase.app/" //<databaseName>.firebaseio.com or <databaseName>.<region>.firebasedatabase.app /* database secret used in Firebase.setQueryIndex function */ #define DATABASE_SECRET "DATABASE_SECRET" /* 4. Define the user Email and password that already registered or added in your project */ #define USER_EMAIL "brsanjeevadharsh@gmail.com...