You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I updated the fingerprint but the node mcu wont still connect to the firebase. In the serial monitor it says that pushing/logs failed:. `//Include Lib for Arduino to Nodemcu
#include <SoftwareSerial.h>
#include <ArduinoJson.h>
#include <ESP8266WiFi.h> // add espwifi to enable wifi connection
#include <FirebaseArduino.h> //add firebase library
#include <ESP8266HTTPClient.h> //add httpclient to connect esp to data
//D6 = Rx & D5 = Tx
SoftwareSerial nodemcu(D4, D3);
#define FIREBASE_HOST "firebaseio.com/"
#define FIREBASE_AUTH "jF3Z3KdpE1iIB9" //secret
const char* ssid= "RF96S5"; //provide ssid (wifi name)
const char* password = "uchihasasuke"; //wifi password
float hum;
float temp;
//Timer to run Arduino code every 5 seconds
unsigned long previousMillis = 0;
unsigned long currentMillis;
const unsigned long period = 10000;
void setup() {
// Initialize Serial port
Serial.begin(9600);
nodemcu.begin(9600);
while (!Serial) continue;
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}
I updated the fingerprint but the node mcu wont still connect to the firebase. In the serial monitor it says that pushing/logs failed:. `//Include Lib for Arduino to Nodemcu
#include <SoftwareSerial.h>
#include <ArduinoJson.h>
#include <ESP8266WiFi.h> // add espwifi to enable wifi connection
#include <FirebaseArduino.h> //add firebase library
#include <ESP8266HTTPClient.h> //add httpclient to connect esp to data
//D6 = Rx & D5 = Tx
SoftwareSerial nodemcu(D4, D3);
#define FIREBASE_HOST "firebaseio.com/"
#define FIREBASE_AUTH "jF3Z3KdpE1iIB9" //secret
const char* ssid= "RF96S5"; //provide ssid (wifi name)
const char* password = "uchihasasuke"; //wifi password
float hum;
float temp;
//Timer to run Arduino code every 5 seconds
unsigned long previousMillis = 0;
unsigned long currentMillis;
const unsigned long period = 10000;
void setup() {
// Initialize Serial port
Serial.begin(9600);
nodemcu.begin(9600);
while (!Serial) continue;
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH); //intialize firebase connection
}
void loop() {
//Get current time
currentMillis = millis();
if ((currentMillis - previousMillis >= period)) {
StaticJsonBuffer<1000> jsonBuffer;
JsonObject& data = jsonBuffer.parseObject(nodemcu);
if (data == JsonObject::invalid()) {
//Serial.println("Invalid Json Object");
jsonBuffer.clear();
return;
}
Serial.println("JSON Object Recieved");
Serial.print("Humidity: ");
hum = data["humidity"];
Serial.println(hum);
Serial.print("Temperature: ");
temp = data["temperature"];
Serial.println(temp);
Serial.println("-----------------------------------------");
}
Firebase.setFloat("Humidity",hum);
Firebase.setFloat("Temperature", temp);
if (Firebase.failed())
{
Serial.print("pushing/logs failed:");
Serial.println(Firebase.error());
return;
}
}`
The text was updated successfully, but these errors were encountered: