Support for the Seeed Round Display?

I foolishly purchased several round displays for projects, including some based on the ESP32C6, only to discover when reading through the notes on its installation that the ESP32C6 won’t work with it.

As far as I can tell, the driver behind this display came out three years ago, so there has been plenty of time to get things working. Should I assume Seeed Studio has no plans or resources to make this happen? And do I need to go get some ESP32C3 or S3 chips?

unfortunatly Seeed did not develop the software… i wish they would put effort in updating the software, but unfortuantly Seeed is a hardware company… I think the C3 is probably the best for it… the S3 i believe is too advanced and the XIAO SAMD is too weak

1 Like

I appreciate that, but hardware without software is useless; and having to spend hours trying to configure the stupid IDE just to work with the hardware is painful. Maybe its normal for this domain. I just not used to it coming from the world of Apple where it all just works!

Just two days ago, we finished supporting ESP32C6 in Round Display, we are still working on the documentation, so if you are in a hurry, you can try to use it first.

4 Likes

Please use esp-arduino 3.0.5. and select XIAO ESP32C6.

3 Likes

Citric,

I am sorry, but I don’t find ESP32C6 in the documentation; I find only ESP32C3 and ESP32S3.

https://docs.platformio.org/en/latest/boards/espressif32/seeed_xiao_esp32s3.html

https://docs.platformio.org/en/latest/boards/espressif32/seeed_xiao_esp32c3.html

Can we go over this online perhaps?

I’m sorry, I’m reading this again. You haven’t finished the documentation. I would love to help you write the documentation if you can spare the time to explain how to do this. I like think I am a good test candidate because I have been programming for decades, worked as a systems engineer, and, most valuable of all, I am retired and have lots of time.

And I far from an expert in platformIO or visual studio, meaning I will ask lots to stupid questions! ideal for documenting everything you need to know to make this work. Already did a write up for this particular piece of hardware here, based on the Arduino IDE.

Based in Europe, so would need to be CET, assuming your in the US.

1 Like

Hi there,
SO, Super Citric Fly’s in and Saves the DAY… NICE one :+1: Working Good Here.!

Here is my successful code demo and it works for both the C3 or C6 without edit.
I loaded some older code too and it worked without using the older TFT_eSPI lib, ver 2.5.23
Very Good!
I have not tested it in conjunction with WiFi or BLE I’ll try that next.
" this is a gauge demo with a Pointer value in the center (after the scrolling text)"
Compiler output and Serial output bellow. :face_with_monocle:


New ROLex…

Gauge Demo

//This will make the meter visually alert you when the reading crosses 45, with both the gauge and the displayed number turning red.
//
// TFT_eSPI.h Version [email protected], updated from https://github.com/Seeed-Projects/SeeedStudio_TFT_eSPI
// BSP is 3.0.5 
// Xiao ESP32C6 AOK :-)
// tested  10/14/24 by PJ Glasso
//
#include <SPI.h>
#include <TFT_eSPI.h>

TFT_eSPI tft = TFT_eSPI(); 

#define WHITE       0xFFFF
#define BLACK       0x0000
#define BLUE        0x001F
#define RED         0xF800
#define GREEN       0x07E0
#define YELLOW      0xFFE0
#define GREY        0x2108
#define TEXT_COLOR  0xFFFF
#define SCALE0      0xC655
#define SCALE1      0x5DEE

#define DEG2RAD     0.0174532925

int xpos = 0;
int ypos = 0;
int gap = 55;
int radius = 120;
int angle;
uint32_t runTime = -99999;
int reading;
int d = 0;
bool range_error = 0;
float rt_x, rt_y, rl_x, rl_y, rr_x, rr_y;
float rt_x_old, rt_y_old, rl_x_old, rl_y_old, rr_x_old, rr_y_old;
float angle_top,  angle_rechts, angle_links;
float center_x = 120;
float center_y = 125;
float temp_00; 
uint32_t chipId = 0;

void setup(void) {
  tft.begin();
  Serial.begin(9600);
  delay (2000);
  Serial.println( "Starting UP , Round Display Test...");
      Serial.println();
   for(int i=0; i<17; i=i+8) {
	  chipId |= ((ESP.getEfuseMac() >> (40 - i)) & 0xff) << i;
	  }
  Serial.printf("ESP32 Chip model = %s Rev %d\n", ESP.getChipModel(), ESP.getChipRevision());
	Serial.printf("This chip has %d cores\n", ESP.getChipCores());
  Serial.print("Chip ID: "); Serial.println(chipId);

  tft.setRotation(0);
  tft.fillScreen(BLACK);

  // Scroll "PJ_Seeed" message in the center for 20 seconds
  scrollText("PJ_Seeed", BLUE, 10 * 1000);  // Display for 20 seconds
  tft.fillScreen(BLACK);   // Clear the screen
}

void loop() {
  if (millis() - runTime >= 0L) {
    runTime = millis();

    temp_00 = random(00, 100); // Simulate random value for testing
    reading = temp_00;
    
    indexTag();  // Update the index tag

    if (reading > 45) {
      ringMeter(reading, 0, 100, xpos, ypos, radius, RED);  // Red gauge if reading > 90
      drawText(String(reading), 120, 125, RED);             // Red font if reading > 90
    } else {
      ringMeter(reading, 0, 100, xpos, ypos, radius, GREEN); // Green gauge for normal range
      drawText(String(reading), 120, 125, WHITE);            // White font for normal range
    }

    delay(1000);  // Wait before next update
  }
}

// Function to scroll text across the screen
void scrollText(String text, uint16_t color, uint32_t duration) {
  uint32_t startTime = millis();
  int textWidth = tft.textWidth(text);
  int xStart = tft.width();  // Start the text off the screen (right side)
  int xEnd = -textWidth;     // End when the text is completely off the screen (left side)

  while (millis() - startTime < duration) {
    int xPos = map(millis() - startTime, 0, duration, xStart, xEnd);
    tft.fillScreen(BLACK);   // Clear the screen
    tft.setTextColor(color, BLACK);
    tft.setTextSize(2);      // Adjust text size as needed
    tft.setCursor(xPos, tft.height() / 2 - 10);  // Center the text vertically
    tft.print(text);
    delay(250);               // Control the scroll speed
  }
}


void drawText(String value, int x, int y, uint16_t color) {
  // Clear a large enough area where the previous text was displayed (with background color)
  int16_t textWidth = tft.textWidth("000");   // Estimate the maximum width for a 3-digit number
  int16_t textHeight = 24;  // Adjust based on text size

  // Fill the area with the background color (BLACK) to ensure old digits are cleared
  tft.fillRect(x - (textWidth / 2), y, textWidth, textHeight, BLACK);

  // Set the new text color and print the new value
  tft.setTextColor(color, BLACK);  // Set text color with background as BLACK
  tft.setTextSize(3);              // Adjust text size as needed
  tft.setCursor(x - (tft.textWidth(value) / 2), y);  // Center the text
  tft.print(value);  // Display the new value
}

// Draw the meter on the screen
int ringMeter(int value, int vmin, int vmax, int x, int y, int r, uint16_t scheme) {
  x += r;
  y += r;
  int w = r / 3;
  angle = 150; 
  int v = map(value, vmin, vmax, -angle, angle);
  byte seg = 3;
  byte inc = 6;

  for (int i = -angle + inc / 2; i < angle - inc / 2; i += inc) {
    float sx = cos((i - 90) * DEG2RAD);
    float sy = sin((i - 90) * DEG2RAD);
    uint16_t x0 = sx * (r - w) + x;
    uint16_t y0 = sy * (r - w) + y;
    uint16_t x1 = sx * r + x;
    uint16_t y1 = sy * r + y;
    float sx2 = cos((i + seg - 90) * DEG2RAD);
    float sy2 = sin((i + seg - 90) * DEG2RAD);
    int x2 = sx2 * (r - w) + x;
    int y2 = sy2 * (r - w) + y;
    int x3 = sx2 * r + x;
    int y3 = sy2 * r + y;

    if (i < v) {
      tft.fillTriangle(x0, y0, x1, y1, x2, y2, scheme);
      tft.fillTriangle(x1, y1, x2, y2, x3, y3, scheme);
    } else {
      tft.fillTriangle(x0, y0, x1, y1, x2, y2, GREY);
      tft.fillTriangle(x1, y1, x2, y2, x3, y3, GREY);
    }
  }
  return x + r;
}

// Draw the index tag
void indexTag() {
  tft.fillTriangle(rt_x_old, rt_y_old, rl_x_old, rl_y_old, rr_x_old, rr_y_old, BLACK);
  
  angle_top = -(240 * DEG2RAD) + ((3 * temp_00) * DEG2RAD);
  angle_links  = (angle_top - (6 * DEG2RAD));
  angle_rechts = (angle_top + (6 * DEG2RAD));
  
  rt_x = (center_x + ((radius - 45) * cos(angle_top)));
  rt_y = (center_y + ((radius - 45) * sin(angle_top)));

  rl_x = (center_x + ((radius - 60) * cos(angle_links)));
  rl_y = (center_y + ((radius - 60) * sin(angle_links))); 
  
  rr_x = (center_x + ((radius - 60) * cos(angle_rechts)));
  rr_y = (center_y + ((radius - 60) * sin(angle_rechts))); 

  rt_x_old = rt_x;
  rt_y_old = rt_y;

  rl_x_old = rl_x;
  rl_y_old = rl_y;
  
  rr_x_old = rr_x;
  rr_y_old = rr_y;

  tft.fillTriangle(rt_x, rt_y, rl_x, rl_y, rr_x, rr_y, YELLOW);   
}

Compiler output that counts…

FQBN: esp32:esp32:XIAO_ESP32C6
Using board 'XIAO_ESP32C6' from platform in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5
Using core 'esp32' from platform in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5
EDIT--- For ___Brevity...
Using library SPI at version 3.0.5 in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\libraries\SPI 
Using library TFT_eSPI at version 2.5.43 in folder: D:\Arduino_projects\libraries\TFT_eSPI 
Using library FS at version 3.0.5 in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\libraries\FS 
Using library SPIFFS at version 3.0.5 in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\libraries\SPIFFS 
"C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp-rv32\\2302/bin/riscv32-esp-elf-size" -A "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\02E327668A7C72E8CA85338770FE5BA0/sketch_oct14a_scroll_pjg_C6_round_eye.ino.elf"
Sketch uses 272642 bytes (20%) of program storage space. Maximum is 1310720 bytes.
Global variables use 13208 bytes (4%) of dynamic memory, leaving 314472 bytes for local variables. Maximum is 327680 bytes.

Serial output…

Starting UP , Round Display Test...

ESP32 Chip model = ESP32-C6 Rev 1
This chip has 1 cores
Chip ID: 16776721

HTH
GL :slight_smile: PJ :v:

2 Likes

PJ,
How did you do that? I didn’t find any documentation? Do you have time. to talk me though it?
Mark

You used Visual Studio? and the platformIO plugin yes?

What does the platformio.ini say? Certainly not this…

[env:seeed_xiao_esp32s3]
platform = espressif32
board = seeed_xiao_esp32s3
framework = arduino

And how did you get it to reference a library other than the one platformIO wants to reference? Presumably, within the “platformIO.ini” file, too.

I tried to import the library Citric indicated to Arduino IDE, and it rejected it as no good.

I faced similar issues with the oversized LVGL library.

See an option at Getting Started with Seeed Studio Round Display for XIAO | Seeed Studio Wiki - #20 by reivilo

1 Like

…Make Way for the Merging Traffic… PJ is coming Thru with full metal Jackets…

1 Like

I have not tested it in PlatformIO, I am using Arduino directly. please make sure you have the following libraries installed in Arduino:
1.GitHub - Seeed-Projects/SeeedStudio_lvgl: Embedded graphics library to create beautiful UIs for any MCU, MPU and display type.
2.GitHub - Seeed-Projects/SeeedStudio_TFT_eSPI: Arduino and PlatformIO IDE compatible TFT library optimised for the Raspberry Pi Pico (RP2040), STM32, ESP8266 and ESP32 that supports different driver chips
3.GitHub - Seeed-Studio/Seeed_Arduino_RoundDisplay: An Arduino graphics library based on LVGL, specifically designed for Round Display for XIAO
4.Arduino GFX version:1.4.9
Then you can use the screen’s display programme. A test programme for the display is provided here: Seeed_Arduino_RoundDisplay/examples/HardwareTest/HardwareTest.ino at main · Seeed-Studio/Seeed_Arduino_RoundDisplay · GitHub

1 Like

Citric/PJ,

I got this running with alot of help from PJ last week and had to do so again when the Arduino environment corrupted itself a few days later. There were three libraries TFT_eSPI, lvgl and the Boards library that seemed to be spoiling the party. We got to work by using a specific combination of versions?

My Arduino environment has it seems corrupted itself again this week, not to mention the fact that I could use the ESP32C6’s I got for anything because of the boards version I found myself having to install.

I see the new versions in PJ post, but I am unclear as to what tool he used compile it? Assuming you/he are simply using the idf.py script, can you share the other files I would need to do so. The CMakeLists.txt in particular I think, maybe something else?

Hi there,

Wow, Sounds like your DEV environment is a little out of kilter.
Nothing fancy or tricky about it.
The TFT_eSPI.h is an Arduino Library, so I used that.
Arduino IDE ver 2.3.3 (I’m sure it will import into PLIO)
Step 1: Downloaded the ZIP from the Github LINK citric posted(it’s an updated TFT_eSPI. Library, etc.)

No need to make it more complicated than it needs to be. Simple steps.

Open the Arduino IDE , Pick a file or open the Demo anything for the Round Eye Display.
Check the Boards tab for the esp BSP 3.0.5 (the most recent)
From the Sketch menu pick Include Library, then Add Zip Library, Pick the one you downloaded from the GIThub link in step ONE.
NO edits, No run around the chair three times waving a chicken in hopes it will compile.
It just works. :+1:

HTH
GL :slight_smile: PJ :v:

Some Notes. Compared to the 2.5.23 or any older ones this is straight forward the edits are already made. Nice to use the current ver. spiffs and FS as well. They will no doubt update the WiKi for the round display but may take some time. It’s Cool the same code works on both C3 and C6 now. :v: with current BSP’s

1 Like

Eureka,

It works!

For those like me looking at these breadcrumbs, the secret here is to download the library and then unzip it. After that, you can copy it directly to the place Arduino stores the library, making sure to rename it TFT_eSPI.

On a mac that is /Users/localuser/Arduino/libraries

Thanks Citric, you saved the day!!

Mark

2 Likes

Hi there,
WRONG answer…so they were just updated… LOL
The round display works perfect with the C3,C6 & S3 also Nrf52840 BLE & Sense versions.
HTH
GL :slight_smile: PJ :v:

1 Like