I have a sketch running nicely on the IDE that displays some sensor readouts on a Giga WiFi with Display Shield, but I want to use some of the cloud features so I can create a web accessible dashboard. I have pushed the sketch from the IDE to the cloud, and it shows up fine, but when I compile I get hundreds of errors. I am guessing its Library related but I am not sure. Any help is appreciated.
Hi @matarali. I'm going to ask you to provide the full output from a compilation.
This procedure is not intended to solve the problem. The purpose is to gather more information.
Please do this:
- Open your sketch in Arduino Cloud Editor.
- Click the ✓ button in the Cloud Editor toolbar.
- Wait for the compilation to fail.
- If the black "Console" panel at the bottom of the Cloud Editor page is minimized, click the ˄ icon at the right side of the "Console" toolbar to expand it.
- Click the icon in the top right corner of the black "Console" panel at the bottom of the Cloud Editor page that looks like two pieces of paper ("Copy Console Output"):
- Open a reply here on this forum topic by clicking the "Reply" button.
- Click the
<CODE/>icon on the post composer toolbar.
This will add the forum's code block markup (```) to your reply to make sure the compilation output is correctly formatted.
- Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
This will paste the compilation output into the code block. - Move the cursor outside of the code block markup before you add any additional text to your reply.
- Click the "Reply" button to publish the post.
In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here.
Click here for attachment instructions
- Open any text editor program.
- Paste the copied output into the text editor.
- Save the file in
.txtformat. - Open a reply here on this forum topic by clicking the "Reply" button.
- Click the "Upload" icon (
) on the post composer toolbar:
The "Open" dialog will open. - Select the
.txtfile you saved from the "Open" dialog. - Click the "Open" button.
The dialog will close. - Click the "Reply" button to publish the post.
Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.
The Cloud overwrote the lvgl version and once I found that and set it back to 8.3.1 most of the error went away.
I do still however have a lv_conf.h error. I have created the file in a tab, but it seems to be looking elsewhere for it.
In file included from /var/run/arduino/directories-data/internal/lvgl_8.3.1_68dc36b23aea3f66/src/../src/misc/lv_log.h:16:0,
from /var/run/arduino/directories-data/internal/lvgl_8.3.1_68dc36b23aea3f66/src/../lvgl.h:25,
from /var/run/arduino/directories-data/internal/lvgl_8.3.1_68dc36b23aea3f66/src/lvgl.h:17,
from /run/arduino/sketches/Get_Weather/Get_Weather.ino:1:
/var/run/arduino/directories-data/internal/lvgl_8.3.1_68dc36b23aea3f66/src/../src/misc/../lv_conf_internal.h:41:18: fatal error: ../../lv_conf.h: No such file or directory
#include "../../lv_conf.h" /Else assume lv_conf.h is next to the lvgl folder/
^~~~~~~~~~~~~~~~~
compilation terminated.
That is correct. It must be located in a library, not as part of the sketch.
The good news is that Arduino actually provides a library that configures LVGL for use with the GIGA R1 WiFi + GIGA Display Shield. The library is named "Arduino_H7_Video". You only need to add an #include directive for the library's Arduino_H7_Video.h header file to your sketch before the #include directive for the "lvgl" library:
#include <Arduino_H7_Video.h>
#include <lvgl.h>
So give that a try.
If for some reason the provided LVGL configuration does not meet your needs, just let us know and we'll provide instructions for setting up your Arduino Cloud account to use your custom LVGL configuration.
I already have that.
Please post your full sketch.
I'll provide instructions you can follow to do that:
- Do an Auto Format on your code by clicking the "Indent" icon near the top right corner of the sketch editor panel in Arduino Cloud Editor.
ⓘ This is done to make the code easier for us to read. - Click on the window that contains your sketch code.
- Press the Ctrl+A keyboard shortcut (Command+A for macOS users).
This will select all the text. - Press the Ctrl+C keyboard shortcut (Command+C for macOS users).
This will copy the selected text to the clipboard. - Open a reply here on this forum topic by clicking the "Reply" button.
- Click the
<CODE/>icon on the post composer toolbar.
This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
- Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
This will paste the copied code into the code block. - Move the cursor outside of the code block markup before you add any additional text to your reply.
- Repeat the above process if your sketch has multiple tabs.
- Click the "Reply" button to publish the post.
When your code requires a library that's not pre-installed in Arduino Cloud, please post a link to where you downloaded that library from.
Thanks for your help. Here is the code..
#include "Arduino_H7_Video.h"
#include "lvgl.h"
#include "Arduino_GigaDisplayTouch.h"
#include <Wire.h>
#include <Adafruit_SHT31.h>
#include <math.h>
#include <WiFi.h>
#include <ArduinoHttpClient.h>
#include <Arduino_JSON.h>
#include "time.h"
#include <WiFiUdp.h>
#include <NTPClient.h>
// Fonts
LV_FONT_DECLARE(lv_font_montserrat_72);
LV_FONT_DECLARE(lv_font_montserrat_29);
LV_FONT_DECLARE(lv_font_montserrat_21);
LV_FONT_DECLARE(lv_font_montserrat_14);
LV_FONT_DECLARE(lv_font_montserrat_21_bold);
// Weather icons
LV_IMG_DECLARE(Partly_Cloudy);
LV_IMG_DECLARE(Sunny);
LV_IMG_DECLARE(Rainy);
LV_IMG_DECLARE(Cloudy);
WiFiUDP ntpUDP;
NTPClient timeClient(ntpUDP, "pool.ntp.org", 0, 60000); // GMT, update every 60s
lv_obj_t* forecast_day_labels[3]; // For the day labels
int lastDaysSince = -1; // stores the last calculated value
// Wi-Fi credentials and OpenWeatherMap config
const char* ssid = "*****";
const char* password = "*****";
const char* weatherHost = "api.openweathermap.org";
String apiKey = "*****";
String units = "metric";
// Display and Touch objects
Arduino_H7_Video Display(800, 480, GigaDisplayShield);
Arduino_GigaDisplayTouch TouchDetector;
Adafruit_SHT31 sht30 = Adafruit_SHT31();
WiFiClient wifi;
HttpClient weatherClient = HttpClient(wifi, weatherHost, 80);
// LVGL objects
lv_obj_t *arc_humidity;
lv_obj_t *label_humidity;
lv_obj_t *label_temp;
lv_obj_t *label_location;
lv_obj_t *switch_unit;
lv_obj_t *switch_label;
lv_obj_t *humidity_bg_dot;
lv_obj_t *left_container;
lv_obj_t* label_daysSince;
lv_obj_t* value_daysSince;
lv_obj_t* label_city;
lv_obj_t* value_city;
lv_obj_t* label_temp_weather;
lv_obj_t* value_temp_weather;
lv_obj_t* label_humidity_weather;
lv_obj_t* value_humidity_weather;
lv_obj_t* label_updating;
lv_obj_t* forecast_labels[3];
lv_obj_t* forecast_icons[3];
lv_obj_t* label_wifi;
lv_obj_t* wifi_bars;
// Styles
lv_style_t style_humidity_arc_fg;
lv_style_t style_humidity_arc_bg;
lv_style_t style_label_72;
lv_style_t style_label_29;
lv_style_t style_label_21;
lv_style_t style_label_21_bold;
lv_style_t style_label_14;
lv_style_t style_white_dot;
lv_style_t style_left_container;
lv_style_t style_temp_weather;
lv_style_t style_city_weather;
lv_style_t style_humidity_weather;
lv_style_t style_wifi;
lv_style_t style_forecast;
bool useCelsius = true;
unsigned long lastUpdate = 0;
unsigned long lastWiFiRetry = 0;
const unsigned long updateInterval = 60000;
const unsigned long wifiRetryInterval = 10000;
float lat = 37.98968;
float lon = -122.59312;
String city = "Fairfax";
const char* dayNames[3] = {"Mon", "Tue", "Wed"};
// -------------------- Helper Functions --------------------
lv_img_dsc_t* conditionToIcon(const char* cond) {
if (strcmp(cond, "Clear") == 0) return (lv_img_dsc_t*)&Sunny;
else if (strcmp(cond, "Clouds") == 0) return (lv_img_dsc_t*)&Cloudy;
else if (strcmp(cond, "Rain") == 0) return (lv_img_dsc_t*)&Rainy;
else return (lv_img_dsc_t*)&Partly_Cloudy;
}
int calculateDaysSince() {
timeClient.update();
unsigned long epochNow = timeClient.getEpochTime();
// Reference date: 21 Sept 2025 00:00:00
struct tm ref = {};
ref.tm_year = 2025 - 1900; // years since 1900
ref.tm_mon = 8; // September (0 = Jan)
ref.tm_mday = 21;
ref.tm_hour = 0;
ref.tm_min = 0;
ref.tm_sec = 0;
time_t refEpoch = mktime(&ref);
// Difference in days
double diff = difftime((time_t)epochNow, refEpoch);
return (int)(diff / (60 * 60 * 24));
}
void updateDaysSince() {
char buf[16];
sprintf(buf, "%d", calculateDaysSince());
lv_label_set_text(value_daysSince, buf);
}
void updateWeatherDisplay(float temp, float humidity) {
char buf[64];
lv_label_set_text(value_city, city.c_str());
sprintf(buf, "%.1f %s", temp, useCelsius ? "C" : "F");
lv_label_set_text(value_temp_weather, buf);
sprintf(buf, "%.0f%%", humidity);
lv_label_set_text(value_humidity_weather, buf);
lv_obj_add_flag(label_updating, LV_OBJ_FLAG_HIDDEN);
}
void updateForecastBox(int dayIndex, const char* dayName, float minT, float maxT, const char* cond) {
char buf[32];
snprintf(buf, sizeof(buf), "%s\n%.0f-%.0f", dayName, minT, maxT);
lv_label_set_text(forecast_labels[dayIndex], buf);
lv_img_set_src(forecast_icons[dayIndex], conditionToIcon(cond));
}
// -------------------- LVGL Widgets --------------------
void setupHumidityWidget(lv_obj_t *parent) {
lv_obj_t *arc_cont = lv_obj_create(parent);
lv_obj_remove_style_all(arc_cont);
lv_obj_set_size(arc_cont, 350, 350);
lv_obj_align(arc_cont, LV_ALIGN_TOP_RIGHT, -20, 50);
lv_style_init(&style_humidity_arc_fg);
lv_style_set_line_width(&style_humidity_arc_fg, 20);
lv_style_set_line_rounded(&style_humidity_arc_fg, true);
lv_style_set_outline_opa(&style_humidity_arc_fg, LV_OPA_TRANSP);
lv_style_init(&style_humidity_arc_bg);
lv_style_set_line_width(&style_humidity_arc_bg, 20);
lv_style_set_line_color(&style_humidity_arc_bg, lv_color_hex(0xDEFB));
lv_style_set_line_rounded(&style_humidity_arc_bg, true);
lv_style_set_outline_opa(&style_humidity_arc_bg, LV_OPA_TRANSP);
lv_style_init(&style_white_dot);
lv_style_set_bg_color(&style_white_dot, lv_color_white());
lv_style_set_bg_opa(&style_white_dot, LV_OPA_COVER);
lv_style_set_radius(&style_white_dot, LV_RADIUS_CIRCLE);
lv_style_init(&style_label_14);
lv_style_set_text_font(&style_label_14, &lv_font_montserrat_14);
arc_humidity = lv_arc_create(arc_cont);
lv_arc_set_range(arc_humidity, 0, 100);
lv_arc_set_value(arc_humidity, 0);
lv_arc_set_bg_angles(arc_humidity, 0, 360);
lv_arc_set_rotation(arc_humidity, 270);
lv_obj_set_size(arc_humidity, 300, 300);
lv_obj_clear_flag(arc_humidity, LV_OBJ_FLAG_CLICKABLE);
lv_obj_center(arc_humidity);
lv_obj_add_style(arc_humidity, &style_humidity_arc_bg, LV_PART_MAIN);
lv_obj_add_style(arc_humidity, &style_humidity_arc_fg, LV_PART_INDICATOR);
label_temp = lv_label_create(arc_humidity);
lv_obj_add_style(label_temp, &style_label_72, LV_PART_MAIN);
lv_label_set_text(label_temp, "--°C");
lv_obj_center(label_temp);
humidity_bg_dot = lv_obj_create(arc_cont);
lv_obj_add_style(humidity_bg_dot, &style_white_dot, LV_PART_MAIN);
lv_obj_set_size(humidity_bg_dot, 40, 40);
lv_obj_clear_flag(humidity_bg_dot, LV_OBJ_FLAG_SCROLLABLE);
label_humidity = lv_label_create(humidity_bg_dot);
lv_label_set_text(label_humidity, "--%");
lv_obj_add_style(label_humidity, &style_label_14, LV_PART_MAIN);
lv_obj_center(label_humidity);
label_location = lv_label_create(parent);
lv_label_set_text(label_location, "Living Room");
lv_obj_add_style(label_location, &style_label_29, LV_PART_MAIN);
lv_obj_align_to(label_location, arc_cont, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);
}
const char* getDayName(time_t epoch) {
struct tm *tm_info = localtime(&epoch);
switch (tm_info->tm_wday) {
case 0: return "Sun";
case 1: return "Mon";
case 2: return "Tue";
case 3: return "Wed";
case 4: return "Thu";
case 5: return "Fri";
case 6: return "Sat";
default: return "";
}
}
// -------------------- Weather Fetching --------------------
void fetchWeather() {
lv_obj_clear_flag(label_updating, LV_OBJ_FLAG_HIDDEN);
// Current weather
String path = "/data/2.5/weather?lat=" + String(lat, 5) + "&lon=" + String(lon, 5) + "&appid=" + apiKey + "&units=" + units;
weatherClient.get(path);
int statusCode = weatherClient.responseStatusCode();
String response = weatherClient.responseBody();
weatherClient.stop();
if (statusCode == 200) {
JSONVar weather = JSON.parse(response);
if (JSON.typeof(weather) != "undefined") {
float temp = double(weather["main"]["temp"]);
float humidity = double(weather["main"]["humidity"]);
updateWeatherDisplay(temp, humidity);
}
}
// Forecast
path = "/data/2.5/forecast?lat=" + String(lat, 5) + "&lon=" + String(lon, 5) + "&appid=" + apiKey + "&units=" + units;
weatherClient.get(path);
statusCode = weatherClient.responseStatusCode();
response = weatherClient.responseBody();
weatherClient.stop();
if (statusCode == 200) {
JSONVar forecast = JSON.parse(response);
if (JSON.typeof(forecast) != "undefined") {
for (int d = 0; d < 3; d++) {
float tempMin = 1000.0;
float tempMax = -1000.0;
const char* condition = "Clear";
for (int i = 0; i < 8; i++) {
int idx = d * 8 + i;
if (idx >= forecast["list"].length()) break;
float tmin = double(forecast["list"][idx]["main"]["temp_min"]);
float tmax = double(forecast["list"][idx]["main"]["temp_max"]);
if (tmin < tempMin) tempMin = tmin;
if (tmax > tempMax) tempMax = tmax;
JSONVar w = forecast["list"][idx]["weather"];
if (w.length() > 0 && JSON.typeof(w[0]["main"]) != "undefined") {
condition = (const char*) w[0]["main"];
}
}
// Calculate day name dynamically
timeClient.update();
time_t now = timeClient.getEpochTime();
time_t forecastDay = now + d * 24 * 60 * 60; // add d days
const char* dayName = getDayName(forecastDay);
updateForecastBox(d, dayName, tempMin, tempMax, condition);
}
}
}
}
// -------------------- Wi-Fi Handling --------------------
void updateWifiBars(int rssi) {
int bars = 0;
if (rssi > -50) bars = 4;
else if (rssi > -60) bars = 3;
else if (rssi > -70) bars = 2;
else if (rssi > -80) bars = 1;
else bars = 0;
lv_obj_clean(wifi_bars);
const int dotDiameter = 16, dotSpacing = 8;
for (int i = 0; i < 4; i++) {
lv_obj_t* dot = lv_obj_create(wifi_bars);
lv_obj_set_size(dot, dotDiameter, dotDiameter);
lv_obj_align(dot, LV_ALIGN_LEFT_MID, i * (dotDiameter + dotSpacing), 0);
lv_obj_set_style_radius(dot, dotDiameter / 2, 0);
lv_obj_set_style_border_width(dot, 0, 0);
lv_obj_set_style_bg_opa(dot, LV_OPA_COVER, 0);
lv_obj_clear_flag(dot, LV_OBJ_FLAG_SCROLLABLE | LV_OBJ_FLAG_CLICKABLE);
if (i < bars)
lv_obj_set_style_bg_color(dot, lv_palette_main(LV_PALETTE_BLUE), 0);
else
lv_obj_set_style_bg_color(dot, lv_palette_main(LV_PALETTE_GREY), 0);
}
}
void checkWiFi() {
if (WiFi.status() != WL_CONNECTED && millis() - lastWiFiRetry >= wifiRetryInterval) {
lv_label_set_text(label_wifi, "Connecting to Wi-Fi...");
lv_obj_add_flag(wifi_bars, LV_OBJ_FLAG_HIDDEN);
WiFi.disconnect();
WiFi.begin(ssid, password);
lastWiFiRetry = millis();
}
if (WiFi.status() == WL_CONNECTED) {
lv_label_set_text(label_wifi, "");
lv_obj_clear_flag(wifi_bars, LV_OBJ_FLAG_HIDDEN);
int32_t rssi = WiFi.RSSI();
updateWifiBars(rssi);
} else {
lv_label_set_text(label_wifi, "Wi-Fi Failed, retrying...");
lv_obj_add_flag(wifi_bars, LV_OBJ_FLAG_HIDDEN);
}
}
// -------------------- Event Handlers --------------------
static void switch_event_cb(lv_event_t * e) {
lv_obj_t * sw = lv_event_get_target(e);
useCelsius = lv_obj_has_state(sw, LV_STATE_CHECKED);
lv_label_set_text(switch_label, useCelsius ? "C" : "F ");
}
// -------------------- Setup & Loop --------------------
void setup() {
Serial.begin(115200);
Display.begin();
TouchDetector.begin();
Wire.begin();
sht30.begin(0x44);
lv_init();
timeClient.begin();
// Styles
lv_style_init(&style_left_container);
lv_style_set_bg_opa(&style_left_container, LV_OPA_TRANSP);
lv_style_set_border_width(&style_left_container, 0);
lv_style_set_radius(&style_left_container, 15);
lv_style_set_pad_all(&style_left_container, 20);
lv_style_init(&style_label_72);
lv_style_set_text_font(&style_label_72, &lv_font_montserrat_72);
lv_style_init(&style_label_29);
lv_style_set_text_font(&style_label_29, &lv_font_montserrat_29);
lv_style_init(&style_label_21);
lv_style_set_text_font(&style_label_21, &lv_font_montserrat_21);
lv_style_init(&style_label_21_bold);
lv_style_set_text_font(&style_label_21_bold, &lv_font_montserrat_21_bold);
lv_style_init(&style_temp_weather);
lv_style_set_text_font(&style_temp_weather, &lv_font_montserrat_21);
lv_style_init(&style_city_weather);
lv_style_set_text_font(&style_city_weather, &lv_font_montserrat_21);
lv_style_init(&style_humidity_weather);
lv_style_set_text_font(&style_humidity_weather, &lv_font_montserrat_21);
lv_style_init(&style_wifi);
lv_style_set_text_font(&style_wifi, &lv_font_montserrat_21);
lv_style_init(&style_forecast);
lv_style_set_text_font(&style_forecast, &lv_font_montserrat_21);
lv_obj_t * scr = lv_scr_act();
lv_obj_clear_flag(scr, LV_OBJ_FLAG_SCROLLABLE);
// Wi-Fi
label_wifi = lv_label_create(scr);
lv_obj_align(label_wifi, LV_ALIGN_TOP_LEFT, 30, 10);
wifi_bars = lv_obj_create(scr);
lv_obj_set_size(wifi_bars, (16 + 8) * 4 + 12, 16);
lv_obj_align(wifi_bars, LV_ALIGN_TOP_LEFT, 30, 40);
lv_obj_clear_flag(wifi_bars, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_set_scrollbar_mode(wifi_bars, LV_SCROLLBAR_MODE_OFF);
lv_obj_set_style_bg_opa(wifi_bars, LV_OPA_TRANSP, LV_PART_MAIN);
lv_obj_set_style_border_width(wifi_bars, 0, LV_PART_MAIN);
// Left container
left_container = lv_obj_create(scr);
lv_obj_remove_style_all(left_container);
lv_obj_add_style(left_container, &style_left_container, LV_PART_MAIN);
lv_obj_set_size(left_container, (int)(Display.width() * 0.48), Display.height() - 40);
lv_obj_align(left_container, LV_ALIGN_TOP_LEFT, 30, 70);
// Right humidity widget
setupHumidityWidget(scr);
// Unit switch
switch_unit = lv_switch_create(scr);
lv_obj_set_size(switch_unit, 80, 40);
lv_obj_add_event_cb(switch_unit, switch_event_cb, LV_EVENT_VALUE_CHANGED, NULL);
lv_obj_align(switch_unit, LV_ALIGN_TOP_RIGHT, -20, 20);
switch_label = lv_label_create(switch_unit);
lv_label_set_text(switch_label, "C");
lv_obj_center(switch_label);
// Weather info
int labelX = 0, valueX = 225, startY = 20, rowSpacing = 50;
label_daysSince = lv_label_create(left_container);
lv_label_set_text(label_daysSince, "Days Since Cast:");
lv_obj_align(label_daysSince, LV_ALIGN_TOP_LEFT, labelX, startY);
lv_obj_add_style(label_daysSince, &style_forecast, 0);
value_daysSince = lv_label_create(left_container);
lv_label_set_text(value_daysSince, "0");
lv_obj_align(value_daysSince, LV_ALIGN_TOP_LEFT, valueX, startY);
lv_obj_add_style(value_daysSince, &style_label_21_bold, 0); // Change to lv_font_montserrat_21 style
updateDaysSince();
label_city = lv_label_create(left_container);
lv_label_set_text(label_city, "Location:");
lv_obj_align(label_city, LV_ALIGN_TOP_LEFT, labelX, startY + rowSpacing);
lv_obj_add_style(label_city, &style_city_weather, 0);
value_city = lv_label_create(left_container);
lv_label_set_text(value_city, city.c_str());
lv_obj_align(value_city, LV_ALIGN_TOP_LEFT, valueX, startY + rowSpacing);
lv_obj_add_style(value_city, &style_label_21_bold, 0); // Change to lv_font_montserrat_21 style
label_temp_weather = lv_label_create(left_container);
lv_label_set_text(label_temp_weather, "Temperature:");
lv_obj_align(label_temp_weather, LV_ALIGN_TOP_LEFT, labelX, startY + 2*rowSpacing);
lv_obj_add_style(label_temp_weather, &style_temp_weather, 0);
value_temp_weather = lv_label_create(left_container);
lv_label_set_text(value_temp_weather, "--°C");
lv_obj_align(value_temp_weather, LV_ALIGN_TOP_LEFT, valueX, startY + 2*rowSpacing);
lv_obj_add_style(value_temp_weather, &style_label_21_bold, 0); // Change to lv_font_montserrat_21 style
label_humidity_weather = lv_label_create(left_container);
lv_label_set_text(label_humidity_weather, "Humidity:");
lv_obj_align(label_humidity_weather, LV_ALIGN_TOP_LEFT, labelX, startY + 3*rowSpacing);
lv_obj_add_style(label_humidity_weather, &style_humidity_weather, 0);
value_humidity_weather = lv_label_create(left_container);
lv_label_set_text(value_humidity_weather, "--%");
lv_obj_align(value_humidity_weather, LV_ALIGN_TOP_LEFT, valueX, startY + 3*rowSpacing);
lv_obj_add_style(value_humidity_weather, &style_label_21_bold, 0); // Change to lv_font_montserrat_21 style
label_updating = lv_label_create(left_container);
lv_label_set_text(label_updating, "Updating...");
lv_obj_align(label_updating, LV_ALIGN_BOTTOM_MID, 0, -30);
lv_obj_add_flag(label_updating, LV_OBJ_FLAG_HIDDEN);
lv_obj_add_style(label_updating, &style_forecast, 0);
// Forecast boxes
int forecastWidth = 80;
int forecastHeight = 180; // taller
int forecastSpacing = 20;
int startForecastY = 200;
for (int i = 0; i < 3; i++) {
lv_obj_t* box = lv_obj_create(left_container);
lv_obj_set_size(box, forecastWidth, forecastHeight);
lv_obj_align(box, LV_ALIGN_TOP_LEFT, labelX + i * (forecastWidth + forecastSpacing), startForecastY);
lv_obj_set_style_bg_opa(box, LV_OPA_TRANSP, 0);
lv_obj_set_style_border_width(box, 0, 0);
lv_obj_clear_flag(box, LV_OBJ_FLAG_SCROLLABLE | LV_OBJ_FLAG_CLICKABLE);
// Weather icon
forecast_icons[i] = lv_img_create(box);
lv_img_set_src(forecast_icons[i], &Sunny);
lv_obj_align(forecast_icons[i], LV_ALIGN_TOP_MID, 0, 80); // move down from top
// Min/Max temperature label
forecast_labels[i] = lv_label_create(box);
lv_label_set_text(forecast_labels[i], "--"); // only min/max
lv_obj_add_style(forecast_labels[i], &style_forecast, 0);
lv_obj_align(forecast_labels[i], LV_ALIGN_TOP_MID, 0, 15); // below icon
}
WiFi.begin(ssid, password);
lastWiFiRetry = millis();
}
void loop() {
lv_timer_handler();
// --- Update "Days Since" once per day ---
int currentDays = calculateDaysSince();
if (currentDays != lastDaysSince) {
lastDaysSince = currentDays;
char buf[16];
snprintf(buf, sizeof(buf), "%d", currentDays);
lv_label_set_text(value_daysSince, buf);
Serial.print("Updated Days Since: ");
Serial.println(currentDays);
}
// Humidity & temperature update
float humidity = sht30.readHumidity();
float tempC = sht30.readTemperature();
if (!isnan(humidity) && !isnan(tempC)) {
int humVal = constrain((int)round(humidity), 0, 100);
lv_arc_set_value(arc_humidity, humVal);
float tempDisplay = useCelsius ? tempC : (tempC * 9 / 5 + 32);
char buf[16];
snprintf(buf, sizeof(buf), "%.0f°%c", tempDisplay, useCelsius ? 'C' : 'F');
lv_label_set_text(label_temp, buf);
int angle_deg = (humVal * 360) / 100;
angle_deg = (angle_deg + 270) % 360;
float rad = angle_deg * 3.14159265f / 180.0f;
const int arc_box_size = 300;
const int arc_center = arc_box_size / 2;
const int arc_line_width = 20;
int arc_radius = arc_center - (arc_line_width / 2);
int x = (int)round(arc_radius * cosf(rad));
int y = (int)round(arc_radius * sinf(rad));
int arc_offset = (350 - arc_box_size) / 2;
int final_x = arc_offset + arc_center + x - (int)lv_obj_get_width(humidity_bg_dot) / 2;
int final_y = arc_offset + arc_center + y - (int)lv_obj_get_height(humidity_bg_dot) / 2;
lv_obj_set_pos(humidity_bg_dot, final_x, final_y);
lv_label_set_text_fmt(label_humidity, "%d%%", humVal);
} else {
lv_arc_set_value(arc_humidity, 0);
lv_label_set_text(label_temp, "--°C");
lv_label_set_text(label_humidity, "--%");
}
delay(200);
lv_task_handler();
checkWiFi();
if (WiFi.status() == WL_CONNECTED && millis() - lastUpdate >= updateInterval) {
lastUpdate = millis();
fetchWeather();
updateDaysSince();
}
}
I just gave it a try and, although it does fail to compile for me, it fails to compile due to some problems with the sketch code, not due to the more fundamental problem of a missing lv_conf.h as you are experiencing.
I'm going to ask you to provide the full verbose output from a compilation.
This procedure is not intended to solve the problem. The purpose is to gather more information.
Please do this:
- Open your sketch in Arduino Cloud Editor.
- Click the "Settings" icon at the bottom left corner of the page:
The "Settings" panel will open. - Select the "Verbose output" radio button under the "Console verbosity" section of the "Settings" panel.
- Click the ✓ button in the Cloud Editor toolbar.
- Wait for the compilation to fail.
- If the black "Console" panel at the bottom of the Cloud Editor page is minimized, click the ˄ icon at the right side of the "Console" toolbar to expand it.
- Click the icon in the top right corner of the black "Console" panel at the bottom of the Cloud Editor page that looks like two pieces of paper ("Copy Console Output"):
- Open a reply here on this forum topic by clicking the "Reply" button.
- Click the
<CODE/>icon on the post composer toolbar.
This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
- Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
This will paste the compilation output into the code block. - Move the cursor outside of the code block markup before you add any additional text to your reply.
- Click the "Reply" button to publish the post.
In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here.
Click here for attachment instructions
- Open any text editor program.
- Paste the copied output into the text editor.
- Save the file in
.txtformat. - Open a reply here on this forum topic by clicking the "Reply" button.
- Click the "Upload" icon (
) on the post composer toolbar:
The "Open" dialog will open. - Select the
.txtfile you saved from the "Open" dialog. - Click the "Open" button.
The dialog will close. - Click the "Reply" button to publish the post.
Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.
OK. It's going to take a while, I am having trouble getting the board connected again. Its fine in the IDE but I'm on a mac and Cloud on Safari doesnt work and even Chrome seems buggy. It might be tomorrow before I get it running again.
You don't need to have a board connected to compile the sketch.
Of course you do need to connect the board if you want to upload the sketch, so that is a problem that must be solved eventually, but you don't need to treat it as a blocker for troubleshooting the compilation problem.
cool.. heres the verbose output
FQBN: arduino:mbed_giga:giga
Using board 'giga' from platform in folder: /run/arduino/directories-data/packages/arduino/hardware/mbed_giga/4.4.1
Using core 'arduino' from platform in folder: /run/arduino/directories-data/packages/arduino/hardware/mbed_giga/4.4.1
Detecting libraries used...
/run/arduino/directories-data/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -c -w -g3 -nostdlib @/run/arduino/directories-data/packages/arduino/hardware/mbed_giga/4.4.1/variants/GIGA/defines.txt @/run/arduino/directories-data/packages/arduino/hardware/mbed_giga/4.4.1/variants/GIGA/cxxflags.txt -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_GIGA -DARDUINO_ARCH_MBED_GIGA -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 -I/run/arduino/directories-data/packages/arduino/hardware/mbed_giga/4.4.1/cores/arduino -I/run/arduino/directories-data/packages/arduino/hardware/mbed_giga/4.4.1/variants/GIGA -DCM4_BINARY_START=0x60000000 -DCM4_BINARY_END=0x60040000 -DCM4_RAM_END=0x60080000 -I/run/arduino/directories-data/packages/arduino/hardware/mbed_giga/4.4.1/cores/arduino/api/deprecated -I/run/arduino/directories-data/packages/arduino/hardware/mbed_giga/4.4.1/cores/arduino/api/deprecated-avr-comp -iprefix/run/arduino/directories-data/packages/arduino/hardware/mbed_giga/4.4.1/cores/arduino @/run/arduino/directories-data/packages/arduino/hardware/mbed_giga/4.4.1/variants/GIGA/../GIGA/includes.txt /var/run/arduino/user-cache/sketches/0E1ECA1A766D51957AED336332419D6F/sketch/Get_Weather.ino.cpp -o /dev/null
Alternatives for lvgl.h: [lvgl@9.3.0 lvgl@8.3.1 lv_arduino@3.0.1]
ResolveLibrary(lvgl.h)
-> candidates: [lvgl@9.3.0 lvgl@8.3.1 lv_arduino@3.0.1]
/run/arduino/directories-data/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -c -w -g3 -nostdlib @/run/arduino/directories-data/packages/arduino/hardware/mbed_giga/4.4.1/variants/GIGA/defines.txt @/run/arduino/directories-data/packages/arduino/hardware/mbed_giga/4.4.1/variants/GIGA/cxxflags.txt -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_GIGA -DARDUINO_ARCH_MBED_GIGA -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 -I/run/arduino/directories-data/packages/arduino/hardware/mbed_giga/4.4.1/cores/arduino -I/run/arduino/directories-data/packages/arduino/hardware/mbed_giga/4.4.1/variants/GIGA -I/var/run/arduino/directories-data/internal/lvgl_8.3.1_68dc36b23aea3f66/src -DCM4_BINARY_START=0x60000000 -DCM4_BINARY_END=0x60040000 -DCM4_RAM_END=0x60080000 -I/run/arduino/directories-data/packages/arduino/hardware/mbed_giga/4.4.1/cores/arduino/api/deprecated -I/run/arduino/directories-data/packages/arduino/hardware/mbed_giga/4.4.1/cores/arduino/api/deprecated-avr-comp -iprefix/run/arduino/directories-data/packages/arduino/hardware/mbed_giga/4.4.1/cores/arduino @/run/arduino/directories-data/packages/arduino/hardware/mbed_giga/4.4.1/variants/GIGA/../GIGA/includes.txt /var/run/arduino/user-cache/sketches/0E1ECA1A766D51957AED336332419D6F/sketch/Get_Weather.ino.cpp -o /dev/null
Alternatives for ../../lv_conf.h: []
ResolveLibrary(../../lv_conf.h)
-> candidates: []
In file included from /var/run/arduino/directories-data/internal/lvgl_8.3.1_68dc36b23aea3f66/src/../src/misc/lv_log.h:16:0,
from /var/run/arduino/directories-data/internal/lvgl_8.3.1_68dc36b23aea3f66/src/../lvgl.h:25,
from /var/run/arduino/directories-data/internal/lvgl_8.3.1_68dc36b23aea3f66/src/lvgl.h:17,
from /run/arduino/sketches/Get_Weather/Get_Weather.ino:1:
/var/run/arduino/directories-data/internal/lvgl_8.3.1_68dc36b23aea3f66/src/../src/misc/../lv_conf_internal.h:41:18: fatal error: ../../lv_conf.h: No such file or directory
#include "../../lv_conf.h" /Else assume lv_conf.h is next to the lvgl folder/
^~~~~~~~~~~~~~~~~
compilation terminated.
Does your sketch have multiple tabs? I ask because when I try to compile the code you provided, it fails with some errors that indicate some code is missing:
sketch/new_sketch_1759272459898.ino.cpp.o: In function `conditionToIcon(char const*)':
/run/arduino/sketches/new_sketch_1759272459898/new_sketch_1759272459898.ino:108: undefined reference to `Rainy'
/run/arduino/sketches/new_sketch_1759272459898/new_sketch_1759272459898.ino:108: undefined reference to `Partly_Cloudy'
/run/arduino/sketches/new_sketch_1759272459898/new_sketch_1759272459898.ino:108: undefined reference to `Sunny'
/run/arduino/sketches/new_sketch_1759272459898/new_sketch_1759272459898.ino:108: undefined reference to `Cloudy'
sketch/new_sketch_1759272459898.ino.cpp.o: In function `setup':
/run/arduino/sketches/new_sketch_1759272459898/new_sketch_1759272459898.ino:453: undefined reference to `lv_font_montserrat_72'
/run/arduino/sketches/new_sketch_1759272459898/new_sketch_1759272459898.ino:453: undefined reference to `lv_font_montserrat_29'
/run/arduino/sketches/new_sketch_1759272459898/new_sketch_1759272459898.ino:453: undefined reference to `lv_font_montserrat_21'
/run/arduino/sketches/new_sketch_1759272459898/new_sketch_1759272459898.ino:453: undefined reference to `lv_font_montserrat_21_bold'
/run/arduino/sketches/new_sketch_1759272459898/new_sketch_1759272459898.ino:453: undefined reference to `Sunny'
However, even though I am experiencing this different problem, the compilation would not have reached the point where it could produce those errors if I was having the same more fundamental problem of a missing lv_conf.h file.
i dont think so.. how would I know?
Just open the sketch in Arduino Cloud Editor and take a look.
This is a sketch that only has one tab ("Get_Weather.ino"):
This is a sketch that has two tabs ("Get_Weather.ino" and "Something.ino"):
- Open the sketch in Arduino Cloud Editor.
- Click on the sketch name near the top right corner of the Cloud Editor page.
A menu will open. - Select "Download" from the menu.
Your web browser will start a file download. - Open a reply here on this forum topic by clicking the "Reply" button.
- Click the "Upload" icon (
) on the post composer toolbar:
The "Open" dialog will open. - Select the "ZIP" file of the sketch that was downloaded to your computer from Cloud Editor.
- Click the "Open" button.
The dialog will close. - Click the "Reply" button to publish the post.
ⓘ Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps 6 - 8 above, you can simply drag and drop the ZIP file onto the post composer field to attach it.






