Error compiling for board ESP32 Dev Module.

Hello everyone, i am new for esp32. Help me please

this is an error

In file included from C:\Users\icekuy\AppData\Local\Temp\arduino_modified_sketch_265312\FirebaseDemo_ESP32.ino:21:0:

C:\Users\icekuy\Documents\Arduino\libraries\IOXhop_FirebaseESP32-master/IOXhop_FirebaseESP32.h:7:25: fatal error: ArduinoJson.h: No such file or directory

compilation terminated.

exit status 1
Error compiling for board ESP32 Dev Module.

This is the code

#include <WiFi.h>
#include <IOXhop_FirebaseESP32.h>

// Set these to run example.
#define FIREBASE_HOST "kidsplantpot.firebaseio.com"
#define FIREBASE_AUTH "nQod8hBSCoTZydYUQId62pQ1PQODLOlChWhhQJXb"
#define WIFI_SSID "vivo 1804"
#define WIFI_PASSWORD "0910202863"

void setup() {
Serial.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);
}

int n = 0;

void loop() {
// set value
Firebase.setFloat("number", 42.0);
// handle error
if (Firebase.failed()) {
Serial.print("setting /number failed:");
Serial.println(Firebase.error());
return;
}
delay(1000);

// update value
Firebase.setFloat("number", 43.0);
// handle error
if (Firebase.failed()) {
Serial.print("setting /number failed:");
Serial.println(Firebase.error());
return;
}
delay(1000);

// get value
Serial.print("number: ");
Serial.println(Firebase.getFloat("number"));
delay(1000);

// remove value
Firebase.remove("number");
delay(1000);

// set string value
Firebase.setString("message", "hello world");
// handle error
if (Firebase.failed()) {
Serial.print("setting /message failed:");
Serial.println(Firebase.error());
return;
}
delay(1000);

// set bool value
Firebase.setBool("truth", false);
// handle error
if (Firebase.failed()) {
Serial.print("setting /truth failed:");
Serial.println(Firebase.error());
return;
}
delay(1000);

// append a new value to /logs
String name = Firebase.pushInt("logs", n++);
// handle error
if (Firebase.failed()) {
Serial.print("pushing /logs failed:");
Serial.println(Firebase.error());
return;
}
Serial.print("pushed: /logs/");
Serial.println(name);
delay(1000);
}

ArduinoJson.h: No such file or directory

Do you have the library installed ?

The ArduinoJson library is required by the library IOXhop_FirebaseESP32
Here are the first lines of the .h file:

#include <Arduino.h>
#include <WiFi.h>
#include <HTTPClient.h>
#include <ArduinoJson.h>
#include "IOXhop_FirebaseStream.h"

Then you don't need to

#include <WiFi.h>

in your code.

Hi,
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom... :slight_smile:

UKHeliBob:

ArduinoJson.h: No such file or directory

Do you have the library installed ?

Thank you so much! i can solved this problem by use json v. 5.13