I want to fetch specific data from firebase using Node Mcu ESP 8266. I can fetch the num value, but I failed to fetch the id value. The serial monitor kept displaying 0 when I try to fetch the id value
. Any method to fetch the newest insert id value( Id value automatically update every time I submit the form at my web application). Thank you ![]()
Below is my coding
#include <ESP8266WiFi.h>
#include <FirebaseArduino.h>
// Set these to run example.
#define FIREBASE_HOST "inserted"
#define FIREBASE_AUTH "inserted"
#define WIFI_SSID "Pro_4258"
#define WIFI_PASSWORD "1234567890"
void setup() {
Serial.begin(9600);
// connect to wifi.
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.print("connecting");
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(500);
}
Serial.println();
Serial.print("connected: ");
Serial.println(WiFi.localIP());
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
}
int a;
void loop() {
a=Firebase.getInt("id");
if (Firebase.failed())
{
Serial.println(Firebase.error());
}else
{
Serial.println(a);
}
delay(500);
}

