Seeeduino xiao and Waveshare 1.02inch E-Ink display- Not working

Hi guys! So I recently got a Seeeduino xiao for a project where i wanted to display images on a Waveshare 1.02inch E-Ink display. I have connected the display pins to the SPI pins of the XIAO according to the datasheets and websites:



I set the CS, DC, RST, BUSY in code using the EPD example in the arduino IDE.

Here is the code from the example. The pins are connected to the XIAO as written in the code:

#include <SPI.h>
#include <EPD1in54B.h>
#include "imagedata.h"

//EPD1in54B epd; // default reset: 8, dc: 9, cs: 10, busy: 7
// EPD1in54B epd(33, 25, 26, 27); // reset, dc, cs, busy
EPD1in54B epd(4, 5, 6, 3);

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  if (epd.init() != 0) {
    Serial.print("e-Paper init failed");
    return;
  }
  epd.displayFrame(IMAGE_BLACK, IMAGE_RED);
}

void loop() {
  // put your main code here, to run repeatedly:

}

I’m still not getting an image on the screen no matter what I try.
I have tried the same thing with an arduino nano and it seems to be working fine.

Has anyone else had this issue. Any help would be appreciated. I am still very new to all this.

I think the problem is caused by you used the wrong header file, and the appropriate header file and method should be used for different sizes of E-Ink display.

You can try to change the second line of the code “#include <EPD1in54B.h>” to “#include EPD_1in02d.h”.

At the same time, it is worth noting that 1.02inch E-Ink display does not have the “displayFrame” method. The related program of the 1.02inch E-Ink display can be found in the official code below: “https://github.com/waveshare/e-Paper/blob/master/Arduino/epd1in02d/epd1in02d.ino”.