I am trying to connect a Waveshare e-Paper display via SPI to the ESP32 board, but I can't get it to work. I am new to the electronics aspect, so I am not sure if I am connecting the pins correctly. Waveshare provides example code for Arduino but when I flash it to my board the display does not do anything. I can see in the serial output that the sketch is flashing fine and running on the board.
I tried editing the code in the example code where the SPI.begin()
happens and pass in the pins I am using (on this line).
After doing that, the code runs past the following block, so it appears the epd.init()
works now.
if (epd.Init() != 0) {
Serial.print("e-Paper init failed");
return;
}
The hardware I am using:
E-Paper display: Waveshare 4.2inch E-Ink display module
Driver board: ESP32 Heltec wifi LoRa (V1)
ESP32 datasheet
If I am on a wrong path all together or if I am meant to use a different library (I came across GxEPD2
, not sure if I am meant to use that one instead?), please feel free to correct me and point me in the right direction. Any help is much appreciated!
My main questions:
- How do I connect the SPI display, which Pins to use?
- Which library to use to display stuff on the display?
- Example code of how to get started?