Fast Partial Update on E-Paper ?

Hello,
I have a "waveshare e-paper 2,9" b/w/r" display module with an ESP32, and I'd like to make a thermometer that update every 5 minutes or so the temperature and humidity.

The problem is that I will have a nice pixel art in the background and it is a verry slow process to refresh all the screen everytime it update.

I tried to do the fast partial update but it wasn't sucessfull, I want to update only the pixels from a small portion of the screen and leave the rest still.

I know it is possible, I've seen it here for example:

but no one share the method and I can't manage to find it in GxEPD2 library example or anywhere else...

I'd like to have a simple example of how to achieve that
IDK if it is usefull but heres my program:

#define ENABLE_GxEPD2_GFX 0

#include <GxEPD.h>
#include <GxEPD2_BW.h>
#include <GxEPD2_3C.h>
#include <Fonts/FreeMonoBold9pt7b.h>
#include "DHT.h"
#include "BitMaps.h"

GxEPD2_3C<GxEPD2_290c, GxEPD2_290c::HEIGHT> display(GxEPD2_290c(/CS=5/ SS, /DC=/ 22, /RST=/ 21, /BUSY=/ 4)); //GxEPD2_290c for 2,9"
DHT dht(0, DHT11); //DHTPIN, DHTTYPE //define pin mode

void PartialWindow();
void printSensors();
void initDisplay();
void initSensors();

const char HelloWorld[] = "SOFLOAN";

void setup(){
Serial.begin(115200); //initialise serial port at 115200 bauds
Serial.println("setup");
initDisplay(); //initialise e-paper display
initSensors(); //initialise sensors
Serial.println("setup done");
}

void loop(){
printSensors();
delay(6000);
}

void initDisplay(){
display.init(115200);
display.setRotation(1);
display.setTextColor(GxEPD_BLACK); //font color
display.setFont(&FreeMonoBold9pt7b); //font type

//int16_t tbx, tby;
//uint16_t tbw, tbh;
//display.getTextBounds(HelloWorld, 0, 0, &tbx, &tby, &tbw, &tbh); //text bounds for x, y location
//uint16_t x = (display.width() - tbw) / 2; // x center of screen
//uint16_t y = (display.height() + tbh) / 2; // y center of screen

display.setFullWindow();
display.firstPage();
do
{
display.fillScreen(GxEPD_BLACK);
//display.drawBitmap(-50, 0, gImage_Frame, 296, 128, GxEPD_BLACK); //Displays bitmap
//display.drawBitmap(-50, -1, gImage_Gauge, 296, 128, GxEPD_RED); //Displays bitmap
//display.setCursor(x, y-50); //setCursor to print text
//display.print(HelloWorld); //print text to display
}
while (display.nextPage());

display.setPartialWindow(100, 30, 75, 50); // x,y,width,height //init partial update
}

void initSensors(){
pinMode(2, OUTPUT); //define LED2
digitalWrite(0, LOW); //Turn off LED2
dht.begin(); //initialise temp/hum sensor
}

void printSensors(){
float h = dht.readHumidity(); // Read humidity as %
float t = dht.readTemperature(); // Read temperature as Celsius (the default)
delay(100);

display.firstPage();
do
{
display.fillScreen(GxEPD_WHITE);
display.setCursor(100, 75);
display.print(t);
delay(50);
}
while (display.nextPage());

Serial.print("Temp");
Serial.print(t);
Serial.print(" Hum");
Serial.print(h);
Serial.println();
}

I use display.setPartialWindow() I fill it in white with display.fillScreen(GxEPD_WHITE) and then print a value inside but the whole screen gets updated.

I hope somebody can help me :slight_smile:
ty!

hi..
i see your codeand try to use it .
i am new in this.
how can i display only the temp in large , and that shold be refresh ?