Inkplate 6 PLUS Daily Weather Station missing Fonts/Inter16pt7b.h

Customer:

Trying to use the Inkplate 6 PLUS Daily Weather example but getting a compilation error:

C:\Users[user]\AppData\Local\Temp. -16000-n5w0zf.j5x7o\Inkplate6PLUS_Daily_Weather_Station\Inkplate6PLUS_Daily_Weather_Station.ino:51:10: fatal error: Fonts/Inter16pt7b.h: No such file or directory
#include “Fonts/Inter16pt7b.h”
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1

What library should I install or include for the fonts?

Originally submitted via the contact form on soldered.com on 28 December 2023. Migrated to the forum for community visibility.

Soldered Support:

Regarding the daily weather example, this is an issue we have run into previously. When you take an Arduino project and ‘save as’, it will save it in a new location and will not copy all the required files.

Go to your Arduino folder:
Documents\Arduino\libraries\Inkplate-Arduino-library\examples\Inkplate6PLUS\Projects\Inkplate6PLUS_Daily_Weather_Station

From this folder, copy everything except the .ino file to your folder where you’re running the sketch from. You can easily find this folder in Arduino by going to Sketch→Show Sketch Folder.

After you paste everything, the compiler should be able to find all the files and it should compile fine.

Customer:

When I merge the quotes example with the Google Calendar example, they display in opposite orientations. I’ve tried orientation numbers 0-3, but when I merge the two examples they end up on opposite sides. How can I get both examples to use the same orientation on the Inkplate 6 PLUS?

Attachment omitted in migration: eink_Orientation.jpg

Attachment omitted in migration: Inkplate6PLUS_Google_Calendar_temp.zip

Soldered Support:

When merging these two examples, you can use the following approach as a basis:

void setup()
{
  // setup code for quotes
  // setup code for google calendar
}

void loop()
{
  if (selected example is quotes) {
    display.setRotation(1);
    // quotes loop
  }
  if (selected example is google calendar) {
    display.setRotation(3);
    // google calendar loop
  }
}

You can always call setRotation() before drawing your elements to get the correct rotation. The Google Calendar example is rotated 180 degrees while the quotes example is rotated correctly. Try a couple of different configurations until you get the one that works.

Customer:

I understand the basic if statement approach works, but the real issue is that it’s hard to commercialize or make user-friendly example code when users have to keep rotating the screen for different orientations.

I also have a question about increasing the buffer when reading from Google Calendar. Here’s my parsing code:

void parseEvents(String json)
{
  DynamicJsonDocument doc(4096);
  // Adjust the size based on your JSON response
  if (deserializeJson(doc, json) != DeserializationError::Ok) {
    Serial.println("Failed to parse JSON");
    return;
  }
  if (!doc.containsKey("items") || !doc["items"].is<JsonArray>()) {
    Serial.println("Missing or invalid 'items' array in JSON");
    return;
  }
  JsonArray events = doc["items"].as<JsonArray>();
  Serial.println("Events:");
  for (JsonObject event : events) {
    if (!event.containsKey("summary") || !event.containsKey("start") || !event.containsKey("end")) {
      Serial.println("Missing key(s) in event. Skipping.");
      continue;
    }
    String summary = event["summary"].as<String>();
    if (!event["start"].containsKey("dateTime") || !event["end"].containsKey("dateTime")) {
      Serial.println("Missing 'dateTime' key in start or end object. Skipping.");
      continue;
    }
    String startDateTime = event["start"]["dateTime"].as<String>();
    String endDateTime = event["end"]["dateTime"].as<String>();
    Serial.println("Summary: " + summary);
    Serial.println("Start: " + startDateTime);
    Serial.println("End: " + endDateTime);
    Serial.println("-------------------------");
  }
}

How can I increase the buffer size?

Soldered Support:

The examples are intended to demonstrate individual features, and specific projects users build are up to them. It’s about writing your own implementations.

For increasing memory with Google Calendar, check this line in our example:

This allocates 2 megabytes from PSRAM. There are 8 MB in total, so you can try increasing this.

The code you sent attempts to take events from JSON in a different format from our example (we use XCAL events to parse). However, here’s some code that gets data from Google Calendar in a similar way to yours:

I’ve added comments that may help you. You can see how to iterate over the events and how to save different data from the received JSON.