Hi there,
i need some help with the GxEPD2 Library and a 2.9'' ePaper Module.
the pins i need to use (and are wired) are these:
#define PIN_DISPLAY_SCL 22
#define PIN_DISPLAY_SDA 21
#define PIN_DISPLAY_CS 14
#define PIN_DISPLAY_DC 12
#define PIN_DISPLAY_RESET 13
#define PIN_DISPLAY_BUSY 25
this is the code i am using:
#include <GxEPD2_BW.h>
#define ENABLE_GxEPD2_GFX 0
GxEPD2_290_BS displayDriver(/*CS=*/PIN_DISPLAY_CS, /*DC=*/PIN_DISPLAY_DC, /*RST=*/PIN_DISPLAY_RESET, /*BUSY=*/PIN_DISPLAY_BUSY);
GxEPD2_BW<GxEPD2_290_BS, GxEPD2_290_BS::HEIGHT> display(displayDriver);
void initializeDisplay()
{
display.init(115200, true, 2, false); // USE THIS for Waveshare boards with "clever" reset circuit, 2ms reset pulse
helloWorld();
display.hibernate();
}
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());
}
the issue is, that nothing is happening. is there anything wrong with the pins? with the code?
any help would be just great!! Thanks a lot!
PS.: the board is a DevKITV1, this is the library: GitHub - ZinggJM/GxEPD2: Arduino Display Library for SPI E-Paper Displays