I wondering if anyone can help with getting a Waveshare 1.54" paper display working with a Raspberry Pico W and GxEPD2 library. I'm struggling a little and failing to get the display to work, code compiles and uploads, I've been trying to use the GxEPD2_Example.ino and stripped it back to basics to make it more understandable, SPI configuration as per comments in code.
The display does work using the SPI pins and the WaveShare example code but not GxEPD2
#include <GxEPD2_BW.h>
#include <Fonts/FreeMonoBold9pt7b.h>
#include "bitmaps/Bitmaps200x200.h" // 1.54" b/w
#define ENABLE_GxEPD2_GFX 0
#define MAX_DISPLAY_BUFFER_SIZE 131072ul // e.g. half of available ram
#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8))
//GxEPD2_BW<GxEPD2_150_BN, MAX_HEIGHT(GxEPD2_150_BN)> display(GxEPD2_150_BN(/*CS=*/ 9, /*DC=*/ 8, /*RST=*/ 12, /*BUSY=*/ 13)); // DEPG0150BN 200x200, SSD1681, TTGO T5 V2.4.1
//GxEPD2_BW<GxEPD2_154, MAX_HEIGHT(GxEPD2_154)> display(GxEPD2_154(/*CS=10*/ 9, /*DC=*/ 8, /*RST=*/ 12, /*BUSY=*/ 13)); // GDEP015OC1 200x200, IL3829, no longer available
// Waveshare-Paper 1.5" Rev 2.1
// Raspberry Pico W, pins:
// DC - GP08
// CS - GP09
// CLK - GP10
// DIN - GP11
// RESET- GP12
// BUSY - GP13
GxEPD2_BW<GxEPD2_154_D67, MAX_HEIGHT(GxEPD2_154_D67)> display(GxEPD2_154_D67(/*CS=*/ 9, /*DC=*/ 8, /*RST=*/ 12, /*BUSY=*/ 13)); // GDEH0154D67 200x200, SSD1681
void setup()
{
Serial.begin(115200);
Serial.println();
Serial.println("setup");
delay(100);
//display.init(115200); // default 10ms reset pulse, e.g. for bare panels with DESPI-C02
display.init(115200, true, 2, false); // USE THIS for Waveshare boards with "clever" reset circuit, 2ms reset pulse
//display.init(115200, true, 10, false, SPI0, SPISettings(4000000, MSBFIRST, SPI_MODE0)); // extended init method with SPI channel and/or settings selection
// first update should be full refresh
helloWorld();
// remaining code as per original example```
