I'm getting ready to go on a road trip. Here is some code that I use to do the e-ink thing. I'm doing things a bit different and hope these things gives you some ideas to get you going.
void fDoTheDisplayThing( void * parameter )
{
float *ptr = CollectionPressure;
int yIncrement = 18;
int CurrentY = 20;
int CurrentX = 5;
String temp1 = "";
temp1.reserve(10);
String temp2 = "";
temp2.reserve(10);
int boxSpacing = 80;
size_t item_size;
for (;;)
{
xEventGroupWaitBits (eg, evtDisplayUpdate, pdTRUE, pdTRUE, portMAX_DELAY );
xSemaphoreTake( sema_eData, portMAX_DELAY );
struct stu_eData px_eData = x_eData;
xSemaphoreGive ( sema_eData );
CurrentY = 20;
display.init();
//display.setFont(&FreeMonoBold9pt7b);
display.setFont(&FreeMono9pt7b);
//u8g2Fonts.setFont(u8g2_font_helvB08_tf);
display.setTextColor(GxEPD_BLACK);
display.setFullWindow();
display.fillScreen(GxEPD_WHITE); // set the background to white (fill the buffer with value for white)
display.setCursor( CurrentX, CurrentY );
// first line
display.drawRect( CurrentX, CurrentY , 70, 55, GxEPD_BLACK);
display.drawBitmap( CurrentX + 10, CurrentY + 5, temperature_icon16x16, 16, 16, GxEPD_BLACK);
display.setCursor( CurrentX + 30, CurrentY + 15 );
//display.print( char(223) + "F" );
display.print( "F" );
display.setCursor( CurrentX + 10, CurrentY + 40);
display.print( String(px_eData.oTemperature) );
display.drawRect( CurrentX + boxSpacing, CurrentY , 70, 55, GxEPD_BLACK);
display.setCursor( CurrentX + 90, CurrentY + 15 );
display.print( "R.H.");
display.setCursor( CurrentX + 90, CurrentY + 35 );
display.print( String((int)px_eData.oHumidity) + "%" );
display.setCursor( CurrentX, CurrentY + 40);
display.drawRect( CurrentX + (boxSpacing * 2 ), CurrentY , 70, 55, GxEPD_BLACK);
display.setCursor( CurrentX + 163, CurrentY + 15 );
display.print( "Dew Pt" );
display.setCursor( CurrentX + 165, CurrentY + 35 );
display.print( String(px_eData.DewPoint) );
display.drawRect( CurrentX + (boxSpacing * 3 ), CurrentY , 70, 55, GxEPD_BLACK);
display.setCursor( CurrentX + 246, CurrentY + 15 );
display.print( "AQI" );
display.setCursor( CurrentX + 246, CurrentY + 35 );
display.print( String(int(px_eData.IAQ)) + "%" );
display.drawRect( CurrentX + (boxSpacing * 4 ), CurrentY , 70, 55, GxEPD_BLACK);
display.setCursor( CurrentX + 327, CurrentY + 15 );
display.print( "R.M." );
display.setCursor( CurrentX + 327, CurrentY + 35 );
display.print( String(int(px_eData.RM0)) + "%" );
// end of first line
if ( px_eData.SunRiseMin < 10 )
{
temp1.concat( "0" + String(px_eData.SunRiseMin) );
} else {
temp1.concat( String(px_eData.SunRiseMin) );
}
if ( px_eData.SunSetMin < 10 )
{
temp2.concat( "0" + String(px_eData.SunSetMin) );
} else {
temp2.concat( String(px_eData.SunSetMin) );
}
CurrentY += yIncrement;
CurrentY += yIncrement;
CurrentY += yIncrement;
CurrentY += yIncrement;
display.setCursor( CurrentX, CurrentY );
display.print( "Wind: " );
CurrentY += yIncrement;
display.setCursor( CurrentX, CurrentY );
display.print( "Speed " + String(px_eData.WS) + "KPH, Dir " + String(px_eData.WD) + " Chill " + String(px_eData.WindChill) + "F" );
CurrentY += yIncrement;
display.drawRect( CurrentX, CurrentY , 70, 55, GxEPD_BLACK);
addsun( 35, CurrentY + 30 , Small, SmallIcon );
display.setCursor( CurrentX + 5, CurrentY + 15 );
display.print( "0" + String(px_eData.SunRiseHr) + ":" + temp1 );
display.setCursor( CurrentX + 5, CurrentY + 50 );
display.print( String(px_eData.SunSetHr) + ":" + temp2 );
display.drawRect( CurrentX + boxSpacing, CurrentY , 70, 55, GxEPD_BLACK);
addraindrop(CurrentX + 110, CurrentY + 15, 7);
display.setCursor( CurrentX + 90, CurrentY + 35 );
display.print( String(px_eData.RF) );
display.setCursor( CurrentX + 100, CurrentY + 50 );
display.print( "mm" );
display.drawRect( CurrentX + (boxSpacing * 2 ), CurrentY , 70, 55, GxEPD_BLACK);
display.setCursor( CurrentX + 177, CurrentY + 15 );
display.print( "C02" );
display.setCursor( CurrentX + 165, CurrentY + 35 );
display.print( String(int(px_eData.CO2)) );
display.setCursor( CurrentX + 165, CurrentY + 50 );
display.print( "PPM" );
//make graph
xSemaphoreTake( sema_CollectPressure, portMAX_DELAY );
CurrentY += yIncrement * 6;
display.setCursor( CurrentX, CurrentY); //set cursor position
//display.drawLine( CurrentX, CurrentY, CurrentX + 200, CurrentY, GxEPD_BLACK);
//int BaseLine = (int)CollectionPressure[0];
int BaseLine = (int)*ptr;
int offsetX = 0;
for ( int j = 0; j < BufferCount; j++ )
{
if ( *(ptr + j) != 0.0f )
{
//int yAdj = BaseLine - (int)CollectionPressure[j];
int yAdj = BaseLine - (int)*(ptr + j);
display.setCursor( CurrentX + offsetX, CurrentY + yAdj );
display.print( "-" );
offsetX += 5;
// log_i( "pressure %f item %d", CollectionPressure[j], j );
}
}
CurrentY += yIncrement;
display.setCursor( CurrentX, CurrentY );
display.print( String(px_eData.oPressure) + "mmHg" );
int Xone = 48;
int Yone = 59;
CurrentY += yIncrement;
display.setCursor( CurrentX, CurrentY );
display.print( PressureRateOfChange() );
xSemaphoreGive( sema_CollectPressure );
temp2 = "";
temp1 = "";
//
display.display(false); // full update
display.hibernate();
//log_i( "DoTheBME280Thing high watermark % d", uxTaskGetStackHighWaterMark( NULL ) );
} //for (;;)
vTaskDelete( NULL );
} //void fDoTheDisplayTHing( void * parameter )
////