Inkplate 2 example sketches not compiling on Arduino IDE 2.1.0

Customer:

The example programs won’t compile. They can’t find the directories for fonts and other needed files. One example can’t find the ArduinoJson file. I’m using the latest Arduino IDE on Windows 11.

Originally submitted via email support on 21 May 2023. Migrated to the forum for community visibility.

Soldered Support:

Have you installed the Arduino Inkplate library and the board definitions correctly? This is a key step in getting any code to run on your Inkplate. The instructions are in the official documentation: Inkplate Get Started Page — Inkplate docs documentation

The examples should compile fine, which is why we have compile tests on GitHub that all have to pass when we make a new release. Certain examples require you to enter WiFi data or an API key, so make sure to check every example before trying to run it.

Enable verbose output during upload and compilation - this often gives valuable information. Go to your Arduino IDE preferences and enable verbose output.

Try these and then try to upload the Black_white_red example. If it still doesn’t work, send:

  • A screenshot of your Tools menu
  • The output from your Arduino IDE upon failure

Attachment omitted in migration: image.png

Customer:

I made sure the boards and libraries were all installed. I attempted to compile the hourly weather script and it stops on the line looking for the ArduinoJson.h file. It says it isn’t found. I searched my hard drive and it isn’t there. Could this be because I’m using Arduino IDE version 2.1.0?

Attachment omitted in migration: image.png

Attachment omitted in migration: IMG_3124.JPG

Attachment omitted in migration: compile-error-noarduniojson.txt

Attachment omitted in migration: IMG_3123.JPG

Attachment omitted in migration: IMG_3122.JPG

Soldered Support:

Regarding the fonts, we have had some users report this issue with Arduino IDE 2.0. It doesn’t seem to like including files in the local directory of the example sketch such as fonts.

The examples compile and run best on the Legacy version of the Arduino IDE, which you can download here: https://www.arduino.cc/en/software/OldSoftwareReleases

You may need to install the Inkplate2 board definition and the library also for the 1.8 IDE. Give it a try and let me know if it works!

Regarding ArduinoJSON - this is an external library which we rely on to run our examples for parsing JSON data from the web. Check the header comment of the Hourly Weather Station example - it notes that the ArduinoJSON library must be installed. You can install it via the library manager.

After installing ArduinoJSON, the example should compile. In the Hourly weather station, make sure to also add the OpenWeatherMaps API key and your lat and lon coordinates.

Attachment omitted in migration: image.png