Code
I'm trying to get a basic "hello world" example, which I poached from the GxEPD2 git repo examples folder. It looks like this:
#include <Wire.h>
#include <SPI.h>
#include <GxEPD2.h>
#include <GxEPD2_BW.h>
#include <epd/GxEPD2_750_T7.h>
#include <Fonts/FreeMonoBold9pt7b.h>
#include <Fonts/FreeMonoBold12pt7b.h>
#include <Fonts/FreeMonoBold18pt7b.h>
#include <Fonts/FreeMonoBold24pt7b.h>
GxEPD2_BW<GxEPD2_750_T7, GxEPD2_750_T7::HEIGHT> ePaperDisplay(GxEPD2_750_T7(/*CS=5*/ 5, /*DC=*/ 27, /*RST=*/ 21, /*BUSY=*/ 4)); // GDEW075T7 800x480
void setup()
{
ePaperDisplay.init();
// comment out next line to have no or minimal Adafruit_GFX code
ePaperDisplay.setTextColor(GxEPD_BLACK);
ePaperDisplay.firstPage();
do
{
ePaperDisplay.fillScreen(GxEPD_WHITE);
// comment out next line to have no or minimal Adafruit_GFX code
ePaperDisplay.print("Hello World!");
}
while (ePaperDisplay.nextPage());
}
void loop() {};
Wiring
I have wired things up as best I could. I followed the advice of ZinggJM and tried to check out the pins_arduino.h file for the board. I'm hoping this is the right file. If so, I was still left with a couple of guesses.
The code compiles and uploads as expected. If you have any ideas as to what might be going on, I would be most appreciative. I'm also not entirely understanding how to find all of the exact right pins. The SPI pins are listed in that file, but the RST and BUSY don't appear there.
welcome to the forum! Congratulations for your perfect first post here!
Except there is no question mark in your post. But this seems to be the question:
I'm also not entirely understanding how to find all of the exact right pins. The SPI pins are listed in that file, but the RST and BUSY don't appear there.
GxEPD2 uses HW SPI, so you need to wire CLK and DIN to the HW SPI pins, as you found out.
The other lines can be connected to any GPIO pin. You just need to specify the same pins in the constructor.
And you need to be cautious with the ESP32 "strapping pins", the pins that select boot modes.
You would notice boot mode issues in the Serial Monitor. And else diagnostic output from GxEPD2.
The Waveshare HAT causes problems, especially with the big e-paper panels. See this post.
You are a gentleman and a scholar! The update to the init call did the trick. Turns out the wiring was just fine. So for anyone else with my exact setup (which I'm sure there are some of as it was pretty much the cheapest option available), here's the code that runs with the above pins on my board: