I have a problem include libraries FirebaseArduino There was an error. fatal error: ArduinoJson.h: No such file or directory How should I solve this problem?
This is my code
#include <ESP8266WiFi.h>
#include <FirebaseArduino.h>
#define FIREBASE_HOST "example.firebaseio.com"
#define FIREBASE_AUTH "token_or_secret"
#define WIFI_SSID "SSID"
#define WIFI_PASSWORD "PASSWORD"
void setup() {
erial.begin(9600);
// 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);
}
void loop() {
Frirebase.setInt("Count", count++);
delay(1000);
}
When you encounter a "No such file or directory" error it usually means you need to install the library that contains the missing file (in this case ArduinoJson.h).
Ideally the documentation for the code you are trying to compile will have instructions for installing dependencies. Sometimes the author did not make the effort to write this documentation and you'll need to go searching for the missing library.
Many Arduino libraries are in the Library Manager index, which makes them quite easy to install:
If you don't find the library you need in Library Manager you'll need to spend some time with your favorite search engine. Once you find the library and download it you'll need to install it.
(In the Arduino IDE) Sketch > Include Library > Add .ZIP Library Select the downloaded file (must be a .zip). Click "Open".
The above installation instructions require the .zip file to have a specific folder structure. In some cases the library author has not been kind enough to provide the correct folder structure. If you get a "Zip doesn't contain a library" error message then you will need to do a manual installation of the library.