paperdink / PaperdInk-Library

Arduino Library to interact with Paperd.Ink
MIT License
21 stars 8 forks source link

Compiling Quotes example fails #6

Closed emilyboda closed 1 year ago

emilyboda commented 1 year ago

I'm unable to compile the quotes example. I've downloaded all three required documents (quotes.ino, config.h, quotes_parser.h) and changed the settings in config.h to include my wifi name, wifi password, and correct time zone.

The following is the error I receive.

Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"

C:\Users\Emily Boda\Documents\Arduino\Quotes\Quotes.ino: In function 'int8_t fetch_quote()':

Quotes:124:9: error: 'DynamicJsonDocument' was not declared in this scope

         DynamicJsonDocument json(50 * 1024);

         ^

Quotes:125:9: error: 'DeserializationError' was not declared in this scope

         DeserializationError error = deserializeJson(json, https.getStream());

         ^

Quotes:127:13: error: 'error' was not declared in this scope

         if (error) {

             ^

Quotes:133:13: error: 'JsonObject' was not declared in this scope

             JsonObject root = json.as<JsonObject>();

             ^

Quotes:134:35: error: 'root' was not declared in this scope

             strncpy(quote_string, root["content"], MAX_QUOTE_LENGTH);

                                   ^

Multiple libraries were found for "WiFi.h"

 Used: C:\Users\Emily Boda\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.5\libraries\WiFi

 Not used: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\WiFi

exit status 1

'DynamicJsonDocument' was not declared in this scope
rgujju commented 1 year ago

@emilyboda Looks like some libraries were not installed correctly. Please make sure the following libraries are installed Adafruit GFX library by Adafruit GxEPD2 by Jean-Marc Zingg version JSON Streaming Parser by Daniel Eichhorn ArduinoJSON by Benoit Blanchon