Hi there,
No worries , ALL code is Garbage LOL, what my old instructor used to say.
I’ll try a compile on it see what I get ,
In the mean Time I loaded up a C3 on my Round display and Rolled back to BSP 2.0.17
I ran the Hardware test under the “Seeed Round Display Examples” the touch screen works good, so I went and Added the WIfi to it and made it display the Wifi name and Ip address it gets.
Try that see if it works for you?
Should look like this…
Slider touch still works fine…
#include <lvgl.h>
// uncomment a library for display driver
//#define USE_TFT_ESPI_LIBRARY
#define USE_ARDUINO_GFX_LIBRARY
#include "lv_xiao_round_screen.h"
#include "lv_hardware_test.h"
#include <WiFi.h>
const char *ssid = "PUT YOURS HERE";
const char *password = "SEEEDaliscous";
// Declare the WiFi SSID/IP label and a flag for toggling
static lv_obj_t *wifi_label;
static bool show_ssid = true;
// Timer callback to alternate between SSID and IP address
void wifi_label_update_cb(lv_timer_t *timer) {
if (show_ssid) {
// Display SSID
lv_label_set_text(wifi_label, ssid);
} else {
// Display IP address
String ip = WiFi.localIP().toString();
lv_label_set_text(wifi_label, ip.c_str());
}
show_ssid = !show_ssid; // Toggle between SSID and IP
}
void setup()
{
Serial.begin( 115200 ); //prepare for possible serial debug
Serial.println( "XIAO round screen - LVGL_Arduino" );
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
lv_init();
lv_xiao_disp_init();
lv_xiao_touch_init();
// Run the hardware test
lv_hardware_test();
// Create a label to display the WiFi SSID or IP address
wifi_label = lv_label_create(lv_scr_act());
lv_label_set_text(wifi_label, ssid); // Initially set the label text to the WiFi SSID
lv_obj_set_pos(wifi_label, 65, 150); // Position the label between the slider and the TF-card
// Create a timer to alternate the label content every 3 seconds
lv_timer_create(wifi_label_update_cb, 3000, NULL);
}
void loop()
{
lv_timer_handler(); //let the GUI do its work
delay(5);
}
HTH
GL PJ
serial output…
Connecting to GlassSurf-2.4
.
WiFi connected
IP address:
192.168.1.188
XIAO round screen - LVGL_Arduino