Hi guys i could use help with a project i am working on currently. i made a custom board for the ESP32 S3 WROOM 1 module and i want to use it to read from an online database and display the data on the epaper display. i am using the 2'9 inch epaper module from waveshare.
I've been trying to use the GxEPD2 library but i cant get even the example codes to show anything on the display. I had to remap the SPI default pins and im wondering if that is causing the problems. I should also mention that this is my first arduino project and first project using the esp32 aswell. Is it possible to remap the SPI pins and use the library without going into the library and making changes in it ? this is a simple code i made to try and make the display to show something
#include <GxEPD2_BW.h>
#include <Fonts/FreeMonoBold9pt7b.h>
#include <SPI.h>
// Select the display driver
GxEPD2_BW<GxEPD2_290, GxEPD2_290::HEIGHT / 2> display(GxEPD2_290(/*CS=*/ 13, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7));
SPIClass mySPI(HSPI); // Create SPI object for HSPI
void setup() {
Serial.begin(115200);
Serial.println();
Serial.println("setup");
// Remap SPI pins for ESP32-S3
mySPI.begin(12, 15, 11, 13); // CLK, MISO, MOSI, CS
// Initialize the display with SPI settings
display.init(115200, true, 10, false, mySPI, SPISettings(1000000, MSBFIRST, SPI_MODE0));
display.setRotation(1);
display.fillScreen(GxEPD_WHITE);
display.setTextColor(GxEPD_BLACK);
display.setFont(&FreeMonoBold9pt7b);
const char text[] = "Hello E-Paper!";
int16_t tbx, tby;
uint16_t tbw, tbh;
display.getTextBounds(text, 0, 0, &tbx, &tby, &tbw, &tbh);
uint16_t x = (display.width() - tbw) / 2 - tbx;
uint16_t y = (display.height() - tbh) / 2 - tby;
display.setCursor(x, y);
display.print(text);
display.display(false);
display.powerOff();
Serial.println("setup done");
}
void loop() {
}