i have a problem on my code that send data from ESP8266 board to firebase
i write a simple code that send a value of a variable to the firebase and increment it and then send it again and so on..
the problem is that the code doesn't send any values to the firebase but the value keeps to be incremented ?
where is the problem ? is that in my code? or in the way of creating the firebase ?
#include <ESP8266WiFi.h>
#include <SoftwareSerial.h>
#include <FirebaseArduino.h>
#define FIREBASE_HOST "lastjune23-23d47-default-rtdb.firebaseio.com"
#define FIREBASE_AUTH "AIzaSyAuKs9XowDTZhn4kqmt8O4xaZSEp1FXSRU"
#define WIFI_SSID "aaa"
#define WIFI_PASS "qwerty123"
float x =0.0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
WiFi.disconnect();
WiFi.begin(WIFI_SSID, WIFI_PASS);
Serial.println("Connecting...");
while (WiFi.status() != WL_CONNECTED)
{
delay(50);
Serial.print('.');
}
Serial.println("");
Serial.print("Connected, Local IP is: ");
Serial.println(WiFi.localIP());
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
if (Firebase.failed())
{
Serial.println("Fisebase log sending failed");
Serial.println(Firebase.error());
return;
}
}
void loop() {
// put your main code here, to run repeatedly:
Serial.print("x: ");
Serial.print(x);
Serial.print("\n");
Firebase.setFloat("TEST/x_float",x++);
delay(500);
}