Waveshare 6inch e-Paper HAT with GxEPD2

Hi Folks,

I'm trying to control the 6-inch Waveshare (1448*1072) e-paper by using a ESP32-S2-DevKitM-1 connected to the IT8951 driver, all managed through the Arduino interface and the GxEPD2 library.

To do this, I tried to load the code provided in GxEPD2_Example.

The main problem I suspect is the cause of the malfunction is the wiring:
I tried to follow the instructions in the GxEPD2_display_selection.h file, to be precise :

#if defined(ESP32)
// grey levels parallel IF e-papers on Waveshare e-Paper IT8951 Driver HAT
// HRDY -> 4, RST -> 16, CS -> SS(5), SCK -> SCK(18), MOSI -> MOSI(23), MISO -> MISO(19), GND -> GND, 5V -> 5V

The first problem appears: pin 23 does not exist on my controller. The second is that I'm not sure that the variables indicated in the following line of code (which I've uncommented in my .h file) are correct:

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

Indeed, why link "DC" to pin 17 and "BUSY" to pin 4 (which is supposed to be linked to HRDY)?

I would like to point out that the code compiles correctly but the screen doesn't display anything.

Please tell me if I need to be more specific in describing my problem, thank you in advance for any help.

Link of the display : display
Link of the ESP32 controller : controller

@tony_volaille, Hi, welcome to the forum!

Please note:

#if defined(ESP32)
// select one and adapt to your mapping, can use full buffer size (full HEIGHT)

or more clearly in GxEPD2_wiring_examples.h:

// mapping suggestion for ESP32, e.g. LOLIN32, see .../variants/.../pins_arduino.h for your board
// NOTE: there are variants with different pins for SPI ! CHECK SPI PINS OF YOUR BOARD
// BUSY -> 4, RST -> 16, DC -> 17, CS -> SS(5), CLK -> SCK(18), DIN -> MOSI(23), GND -> GND, 3.3V -> 3.3V

ESP32S2 uses different HW SPI pins per default (can be re-mapped, though):
https://github.com/espressif/arduino-esp32/blob/master/variants/esp32s2/pins_arduino.h

static const uint8_t SS    = 34;
static const uint8_t MOSI  = 35;
static const uint8_t MISO  = 37;
static const uint8_t SCK   = 36;

The other pins can be chosen freely, but the wiring and the constructor parameters need to correspond.
-jz-

Thank you very much, everything's working perfectly now !
For those who would like to use the same set-up, here's my connection:

  • HRDY -> 4
  • RST -> 16
  • CS -> SS(34)
  • SCK -> SCK(36)
  • MOSI -> MOSI(35)
  • MISO -> MISO(37)
  • GND -> GND
  • 5V -> 5V

As well as the corresponding line of code in GxEPD2_display_selection.h :

GxEPD2_BW < GxEPD2_it60_1448x1072, GxEPD2_it60_1448x1072::HEIGHT / 4 > display(GxEPD2_it60_1448x1072(/*CS=34*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4));
1 Like

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