Issues with GxEPD2 Hello World Example on Waveshare 2.13

Hello everyone,

I'm having some trouble trying out the GxEPD2 Hello World sample program with my ePaper display. The model I'm using is the Waveshare 2.13 labeled as HINK-E0213A22-A0 SLH19148.

So far, I've tried using GxEPD2_DRIVER_CLASS GxEPD2_213_B72 and GxEPD2_DRIVER_CLASS GxEPD2_213_B73, but the display does not show anything. However, when I tried using a different sample program from EPD epd2in13v2, it successfully displays an image.

Has anyone encountered a similar issue or could possibly provide some guidance on how to troubleshoot this?

Any help would be greatly appreciated. Thanks!

Are you using 3v3 power and data lines or 5v >> 3v3 converters and level shifters?

The actual Waveshare boards have level converters and are safe to use with 5V AVR processors.
They also have the "clever" reset circuit, requiring to use a shortened reset pulse.
This is the default now also with GxEPD2_HelloWorld.ino.

Make sure your wiring corresponds to the constructor parameters used.
The Waveshare examples use a different wiring than GxEPD2 on Arduino UNO.
-jz-

See also: [SOLVED] Waveshare Pico-ePaper-2.13 on Arduino Pro Mini 3.3V with GxEPD2 library

I have already followed the instructions given in the Waveshare manual. I have also read articles about the Pico e-paper. However, it seems that I still can't quite understand it well



I suspect that's probably the case.

Would you post these two?

you can find it at
epd2in13V2
GxEPD2_HelloWorld

im sorry sir, can you explain more clear.

The fact is, I am confused in using the GxEPD2_HelloWorld example program. From what I understand, it should be enough to uncomment the driver class that matches the e-paper product I am using in "GxEPD2_display_selection_new_style.h". Since I have the HINK-E0213A22-AOSLH 1948 model, I tried one of either "GxEPD2_213_B72" or "GxEPD2_213_B73" but still have not succeeded.

Okay... this one works for you...

#include <SPI.h>
#include "epd2in13_V2.h"
#include "imagedata.h"

Epd epd;

void setup()
{
  // put your setup code here, to run once:
  Serial.begin(9600);
  Serial.println("epd FULL");
  epd.Init(FULL);
  epd.Display(IMAGE_DATA);

  Serial.println("epd PART");
  epd.DisplayPartBaseImage(IMAGE_DATA);
  char i = 0;
  for (i = 0; i < 10; i++) {
    Serial.println("e-Paper PART IMAGE_DATA");
    epd.Init(PART);
    epd.DisplayPart(IMAGE_DATA);
    Serial.println("e-Paper PART Clear");
    epd.ClearPart();
  }
  epd.Init(FULL);
  Serial.println("e-Paper clear and sleep");
  epd.Clear();
  epd.Sleep();
}

void loop()
{
}

This one does not work for you...

// GxEPD2_HelloWorld.ino by Jean-Marc Zingg

// see GxEPD2_wiring_examples.h for wiring suggestions and examples
// if you use a different wiring, you need to adapt the constructor parameters!

// uncomment next line to use class GFX of library GFX_Root instead of Adafruit_GFX
//#include <GFX.h>

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

// select the display class and display driver class in the following file (new style):
#include "GxEPD2_display_selection_new_style.h"

// or select the display constructor line in one of the following files (old style):
#include "GxEPD2_display_selection.h"
#include "GxEPD2_display_selection_added.h"

// alternately you can copy the constructor from GxEPD2_display_selection.h or GxEPD2_display_selection_added.h to here
// e.g. for Wemos D1 mini:
//GxEPD2_BW<GxEPD2_154_D67, GxEPD2_154_D67::HEIGHT> display(GxEPD2_154_D67(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEH0154D67

void setup()
{
  //display.init(115200); // default 10ms reset pulse, e.g. for bare panels with DESPI-C02
  display.init(115200, true, 2, false); // USE THIS for Waveshare boards with "clever" reset circuit, 2ms reset pulse
  helloWorld();
  display.hibernate();
}

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

void helloWorld()
{
  display.setRotation(1);
  display.setFont(&FreeMonoBold9pt7b);
  display.setTextColor(GxEPD_BLACK);
  int16_t tbx, tby; uint16_t tbw, tbh;
  display.getTextBounds(HelloWorld, 0, 0, &tbx, &tby, &tbw, &tbh);
  // center the bounding box by transposition of the origin:
  uint16_t x = ((display.width() - tbw) / 2) - tbx;
  uint16_t y = ((display.height() - tbh) / 2) - tby;
  display.setFullWindow();
  display.firstPage();
  do
  {
    display.fillScreen(GxEPD_WHITE);
    display.setCursor(x, y);
    display.print(HelloWorld);
  }
  while (display.nextPage());
}

void loop() {};

Have you followed @ZinggJM link to the SOLVED page post #6?

yes just like that, i have read the link to the SOLVED. the man has similar problem like me, and im just tryng change the driver class only as i said before and about the pins out im still using waveshare manual

Take a look at GxEPD2_wiring_examples.h

im using arduino uno VCC at 5v

// mapping suggestion for AVR, UNO, NANO etc.
// BUSY -> 7, RST -> 9, DC -> 8, CS-> 10, CLK -> 13, DIN -> 11

thanks for reminder, i was wrong thats the pin out is different with waveshare manual... the different is in RST pin and DC pin.

thank you so much guys, and im sorry for all my mistake.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.