Stuck on E-Paper Display

Hello :slight_smile:

I've been strugling on the "2.9inch waveshare e-paper display module B" and "ESP32" program for a while now.

I made function the spi (I think at least) and display noise on the screen WOOoo ! :smiley:

Also noise is the only thing I managed to display...

It is not even using the whole screen, so, can anyone help me fill the whole screen and whrite a nice HelloWorld ?

Heres my code, I need help on how to fill with a color and write text:

ty!
#define ENABLE_GxEPD2_GFX 0

#include <GxEPD2_BW.h>
#include <GxEPD2_3C.h>
#include <Fonts/FreeMonoBold9pt7b.h>

#include "bitmaps/Bitmaps3c128x296.h" // 2.9" b/w/r

GxEPD2_BW<GxEPD2_420, GxEPD2_420::HEIGHT> display(GxEPD2_420(/CS=5/ SS, /DC=/ 22, /RST=/ 21, /BUSY=/ 4));

void setup(){
Serial.begin(115200);
display.init();
Serial.println("setup");
delay(100);

Serial.println("setup done");
}

void loop(){
}

Why do you use the line for the 4.2" b/w if you have a 2.9" 3-color display?

//GxEPD2_3C<GxEPD2_290c, GxEPD2_290c::HEIGHT> display(GxEPD2_290c(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4));

This should work for ESP32.

And of course display.init() only will not produce any output. Consider using GxEPD2_Example.ino

Hello,

I cannot manage to Display something else than noise on my "waveshare e-paper 2,9" b/w/r Display", I am using a "Doit ESP32 Devkit V1".

So as I said all it displays on the screen is noise, it also create red pixels but theres no "red" in the code..
I'm stuck for weeks now, can anyone help me Display a HelloWorld ??

I'm quite new to the land of makers and adruino, so I don't even know if my wiring is right, I used this guide to setup the SPI aswell:

And heres the current wiring I use:

DIN - D23
CLK - D18
CS - D5
DC - D22
RST - D21
BUSY - D4

I used this library and its examples:

And I run this porgram:

#define ENABLE_GxEPD2_GFX 0

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

#include "bitmaps/Bitmaps3c128x296.h" // 2.9" b/w/r

GxEPD2_3C<GxEPD2_750c, GxEPD2_750c::HEIGHT> display(GxEPD2_750c(/CS=5/ SS, /DC=/ 22, /RST=/ 21, /BUSY=/ 4));

void setup(){
Serial.begin(115200);
Serial.println("setup");
initDisplay();
Serial.println("setup done");
}

void loop(){
}

const char HelloWorld[] = "Hello World!";

void initDisplay(){
display.init();
display.setRotation(1);
display.setTextColor(GxEPD_BLACK);
display.setFont(&FreeMonoBold9pt7b);

int16_t tbx, tby; uint16_t tbw, tbh;
display.getTextBounds(HelloWorld, 0, 0, &tbx, &tby, &tbw, &tbh);
uint16_t x = (display.width() - tbw) / 2;
uint16_t y = (display.height() + tbh) / 2; // y is base line!
display.setFullWindow();
display.firstPage();
do
{
//Those 3 lines does nothing, without them the noise is still generated on the display
display.fillScreen(GxEPD_WHITE);
display.setCursor(x, y);
display.print(HelloWorld);
}
while (display.nextPage());
}


Thanks, and I hope somebody can help :x !!

@Sofloan

Do not create new topic for every post!

GxEPD2_3C<GxEPD2_750c, GxEPD2_750c::HEIGHT> display(GxEPD2_750c(/CS=5/ SS, /DC=/ 22, /RST=/ 21, /BUSY=/ 4));

Change to use with your 2.9" 3-color:

GxEPD2_3C<GxEPD2_290c, GxEPD2_290c::HEIGHT> display(GxEPD2_290c(/*CS=5*/ SS, /*DC=*/ 22, /*RST=*/ 21, /*BUSY=*/ 4));

This is my last post for you, unless you acknowledge my post.

@ZinggJM Oh so sorry :s
I' won't happen again :smiley:

And holy molly, I understand my error now, I used "GxEPD2_750c" but it means 7,5" right ?
So the GxEPD2_290c means 2,9" ?

It runs like a charm now ty :slight_smile:

@Sofloan,

Thank you for your answer and confirmation that it works.

Yes, in GxEPD2 I use GxEPD2_750 and GxEPD2_750c for 7.5" b/w and 7.5" 3-color, and so on.
GxEPD2_290c is for 2.9" 3-color.

Good luck for your use of e-paper displays!