why my program not reading data from the firebase? it always read as 0..can anyone explain me why?
here is my code.
#include <ESP8266WiFi.h>
#include <FirebaseArduino.h>
#define FIREBASE_HOST "lightscontrol-985c3.firebaseio.com"
#define FIREBASE_AUTH "icJow4FD6FzdbA4dbb0sSwmxw7xDXly7Fq9BJ49c"
#define WIFI_SSID "SLT FIBER"
#define WIFI_PASSWORD "0779644988"
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 n = 0;
void loop() {
// get value
Serial.println("testing.. ");
Serial.println(Firebase.getInt("cmd1lbl"));
delay(1000);
delay(1000);
}
database details attached as a picture.
Thanks for the help.
