I want to connect to firebase database but continously getting this error

#include <Firebase.h>
#include <FirebaseArduino.h>
#include <FirebaseCloudMessaging.h>
#include <FirebaseError.h>
#include <FirebaseHttpClient.h>
#include <FirebaseObject.h>

#define FIREBASE_HOST “fir-app-example.firebaseio.com

#define FIREBASE_AUTH “examplesd2asdasdasdasd2asd3asd2asd2as32das3d2as2da3”

#define WIFI_SSID “abcd”

#define WIFI_PASSWORD “123456”

#define LED 13

void setup() {

pinMode(LED,OUTPUT);

digitalWrite(LED,0);

Serial.begin(9600);

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.setInt(“LEDStatus”,0);

}

void loop() {

if(Firebase.getInt(“LEDStatus”))

{

digitalWrite(LED,HIGH);

}

else

{

digitalWrite(LED,LOW);

}

if (Firebase.failed()) // Check for errors {

Serial.print(“setting /number failed:”);

Serial.println(Firebase.error());

return;

}

delay(1000);

}

Error:
I’m constantly getting this error

arduino-builder/arduino-builder -compile -core-api-version 10611 -build-path /tmp/808655269 -hardware arduino-builder/hardware -hardware arduino-builder/packages/cores -tools arduino-builder/tools -tools arduino-builder/packages/tools -built-in-libraries arduino-builder/latest -libraries /tmp/608097246/pinned -libraries /tmp/608097246/custom -fqbn arduino:avr:uno -build-cache /tmp -verbose=false /tmp/608097246/Firebase

In file included from /tmp/608097246/Firebase/Firebase.ino:1:0:

/tmp/608097246/custom/firebase-arduino/src/Firebase.h:24:18: fatal error: memory: No such file or directory

#include

^

compilation terminated.

exit status 1

My Board: Arduino Uno+ESP8266

So, Firebase.h - part of the third party library you are using - has an extremely basic error in it: no .h on the include. At this point, I would abandon using that library altogether.

If you want to fix it, go into your-arduino-install/libraries/firebase-arduino/src/Firebase.h and fix the offending line

#include <memory.h>

But its a safe bet there will be tons more obvious errors.

It's no error. The error is that sudhanshubhagat101 is trying to compile a library that is written to run on ESP8266 for Uno, which it is not compatible with. The AVR toolchain does not contain that file but the ESP8266 toolchain does indeed.

None of the firebase-arduino examples include Firebase.h (or FirebaseError.h or FirebaseHttpClient.h or FirebaseObject.h). They include ONLY FirebaseArduino.h except the FirebaseCloudMessaging example which includes ONLY FirebaseCloudMessaging.h (doesn't include FirebaseArduino.h).

Try removing all of the includes except FirebaseArduino.h.

See the source code at: https://github.com/firebase/firebase-arduino

Because the author of the FirebaseArduino library hasn’t defined an includes value in library.properties, when you do Sketch > Include Library > FirebaseArduino it automatically adds all those includes to the sketch.

FirebaseArduino.h includes Firebase.h, which includes memory so the same problem remains. However, FirebaseArduino.h includes string before that so you will get this error compiling for Uno:

E:\arduino\libraries\firebase-arduino\src/FirebaseArduino.h:20:18: fatal error: string: No such file or directory

 #include <string>

From private message:

kiroe: I wanted to consult you over a comment you did in this post https://forum.arduino.cc/index.php?topic=499268.0

Do you know where I can get the esp8266 toolchain element you mentioned that is required for Arduino Uno to be able to read the data on the Firebase-Arduino Master library?

There are at least a couple, they are in xtensa-lx106-elf-gcc, which you can download from here:

How did I know that? I installed the ESP8266 core for Arduino, searched the tools folder of the package for the files in question (memory and string), found the tool name from the folder name that contained them and then found the download URLs from the ESP8266 core for Arduino's Boards Manager JSON URL: http://arduino.esp8266.com/versions/2.3.0/package_esp8266com_index.json which contains the download URLs for all the tool dependencies of that package.

However, I don't think any of that will do you any good for trying to get the library working on your Uno. The uno has a different architecture from the ESP8266 and just grabbing some files out of the ESP8266 toolchain is highly unlikely to work.

To solve this you’ll need to change the board to generic ESP8266
and use the #include

Unfortunately this solution doesn’t seem to work for Arduino Uno Wifi board (which comes with an integrated esp8266 module) which is the subsequent issue I wanted to solve with the prior message sent to pert.

Tl;Dr: I think that as long as you have an external ESP8266 module, this solution should work. The firebase arduino library doesn’t work with other options since it requires a #include <$String> which isn’t present in libraries other than the ESP8266WiFi one

Do you believe that if I connect an external ESP8266 module to the arduino uno wifi, I'll be able to select and send the arduino build to a "Generic 8266 module" board

kiroe:
Do you believe that if I connect an external ESP8266 module to the arduino uno wifi, I’ll be able to select and send the arduino build to a “Generic 8266 module” board

Yeah, some people will use their Arduino as a USB-serial adapter to directly program the ESP8266. You’ll find tons of tutorials for this. The most confusing thing is that you need to make the connection between the ESP8266 and the Arduino pins as RX-RX, TX-TX instead of the standard RX-TX, TX-RX. The other trick is that you need to make sure the microcontroller (ATmega328P in your case) on the Arduino board is not interfering with the serial communication between the PC and the ESP8266. Doing this tends to lead to a lot of confusion and problems so it’s only really worth doing if you have the Arduino board and the ESP8266 and don’t want to wait for a dedicated USB-serial board to get shipped to you. If possible I recommend buying a cheap (<$2 USD with free shipping from China) dedicated USB-serial breakout on eBay or whatever your favorite source for breakout boards is. You can even buy boards that the ESP-01 modules plug right in to.

If you’re going to be using the ESP8266 standalone then you should consider a Wemos D1 Mini or NodeMCU board, which have the USB-serial circuitry on the board so you can just plug them in to the USB port on your computer and upload right to the board.

So I got a NodeMCU board and was able to build arduino code that connects to wifi and (supposedly) connects to firebase.

I followed the instructions on this video: https://www.youtube.com/watch?v=oD90mwMuNSU

While everything seems to work, the Firebase.setInt method doesn't upload any value to the connected Firebase

Have you got any clues as to why this may be happening?

While everything seems to work, the Firebase.setInt method doesn't upload any value to the connected Firebase

I wouldn't expect it to. I'd expect it to set a value in the parameter list that eventually gets used to make a GET request.

Post all of your current code AND links to the non-standard libraries you are using.