Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Esp is not connecting to the firebase. This is my project code i am not able to receive the data in the firebase database. what my be the error. #486

Closed
ghost opened this issue Apr 9, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 9, 2020

#include <FirebaseArduino.h>
#include <ESP8266WiFi.h>
#define FIREBASE_HOST "arduinotest-f6d5e.firebaseio.com"
#define FIREBASE_AUTH "u65MmIKJqyvHoUmG6hMMK0KoCuMYl7ZRF06Y4JFG"
#define WIFI_SSID "kick"
#define WIFI_PASSWORD "12345678"
float fire;
void setup() {
Serial.begin(9600);
pinMode(D5, OUTPUT);
pinMode(D6, OUTPUT);
pinMode(A0, INPUT);
// 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);
Firebase.set("LED_STATUS", 0);
}
int n = 0;
void loop() {
int analogValue = analogRead(A0);
float millivolts = (analogValue/1024.0) * 3300; //3300 is the voltage provided by NodeMCU
float celsius = millivolts/10;

Serial.print("in DegreeC= ");
Serial.println(celsius);
delay(1);
if(celsius>35){
digitalWrite(D6,HIGH);
Firebase.setInt("fire_sensor_status",1);
}
n = Firebase.getInt("LED_STATUS");
// handle error
if (n==1) {
Serial.println("LED ON");
digitalWrite(D5,HIGH);
return;
delay(10);
}
else {
Serial.println("LED OFF");
digitalWrite(D5,LOW);
digitalWrite(D6,LOW);
Firebase.setInt("fire_sensor_status",0);
return;
}
}

@ghost ghost changed the title This is my project code i am not able to receive the data in the firebase database. what my be the error. Esp is not connecting to the firebase. This is my project code i am not able to receive the data in the firebase database. what my be the error. Apr 9, 2020
@Arafa-microsys
Copy link

Your problem in Fingerprint, the fingerprint of firebase is changing every short period, So the library doesn't work and you need to change fingerprint with a new one.
I advise you to use the best version of this Library and the new one not based on Fingerprint so if changed any time you will not worry about that.
https://github.com/mobizt/Firebase-ESP8266
but if you want to use this old library you can follow the instructions here to change fingerprint to a new one #439.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant