English 中文(简体)
Error with FirebaseArduino library. nodeMCU-ESP8266, Arduino, Firebase
原标题:

my code:

#include <ESP8266WiFi.h>
#include <FirebaseArduino.h>

#define WIFI_SSID "NAME"
#define WIFI_PASSWORD "PSW"
#define FIREBASE_HOST "example-53ffa-default-rtdb.europe-west1.firebasedatabase.app"
#define FIREBASE_AUTH "example"

void setup() {
  Serial.begin(9600); // Inicializamos el serial a 9600 baudios
  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);

  Serial.println("Conectando");
  while (WiFi.status() != WL_CONNECTED) //Realizando conexion
  {
    delay(500);
    Serial.print(".");
  }

  Serial.println("Conexion Exitosa");

  Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH); // Conectamos con la base de datos

  Firebase.setInt("Entero", 25);
  if (Firebase.success()) {
    Serial.println("Ok");
  } else {
    Serial.println("Conexion fallida");
  }

}

void loop() {
  // put your main code here, to run repeatedly:

}

and this is my error:

In file included from D:Arduinolibrariesfirebase-arduino-mastersrc/Firebase.h:29,
                 from D:Arduinolibrariesfirebase-arduino-mastersrc/FirebaseArduino.h:22,
                 from D:Arduinoesp8266_firebaseesp8266_firebase.ino:2: D:Arduinolibrariesfirebase-arduino-mastersrc/FirebaseError.h:7:1: error: expected  ,  or  ;  before  enum 
    7 | enum FIREBASE_ERROR_CODES {
      | ^~~~
exit status 1
Error compilando para la tarjeta NodeMCU 0.9 (ESP-12 Module).

I ve looked for problems in Firebase.h and FirebaseArduino.h and i haven t see any problem. You can find the library here: https://github.com/FirebaseExtended/firebase-arduino

Please help me! thank you!

问题回答

Finally i could solve the problem.

nodeMCu-ESP8266, FirebaseArduino library and ArduinoJson library didn’t work with new versions.

I can run the program with ArduinoJson v.5.13.5, esp8266 v.2.4.1

Yes i have sucees with run the program with ArduinoJson v.5.13.5, esp8266 v.2.4.1.

Thanks





相关问题
Serial Communication between Java RXTX and Arduino

I m trying to communicate between my PC (Windows 7 using Netbeans and RXTX) with an Arduino Pro, using the serial port. The Arduino is actually connected to the PC using an FTDI cable. The code is ...

Arduino web client class not working

I am trying to use the Arduino client class to fetch an HTML page from the Internet (example from the Arduino library itself), but it s not working (connection is not getting established). It s ...

Make hardware for the iPhone

I am pretty clear about the fact that I build software to leverage hardware devices that they work with the iPhone thru EAAccessory and bros. What I am not clear where do I get the hardware ...

Home automation using Arduino / XMPP client for Arduino

I am trying to setup a system for automating certain tasks in my home. I am thinking of a solution wherein a server side application would be able to send/receive commands/data to Arduino (attached ...

Interrupt driven HD44780 library for an Arduino

I have an HD44780 LCD screen, and I ve been using the LiquidCrystal Library provided with the Arduino development package. However, it s not reliable. I noticed some problems with it, and instead of ...

Arduino String Formatting Issue

I m making an Arduino-powered clock, and in the process, I m trying to format integers into two-digit formatted strings for the time read-out (e.g. 1 into "01"). The following gives me "error: ...

Using classes with the Arduino

I m trying to use class objects with the Arduino, but I keep running into problems. All I want to do is declare a class and create an object of that class. What would an example be?

热门标签