E-paper display not showing entire image

Hi everyone,

I don't understand why my display isn't showing the image I've loaded completely, but only for a part of the top part. The display I'm using is a wave share 1.54" b/w.

// mapping suggestion for Arduino MEGA
// BUSY -> 7, RST -> 9, DC -> 8, CS-> 53, CLK -> 52, DIN -> 51

// include library, include base class, make path known
#include <GxEPD.h>

// select the display class to use, only one
#include <GxGDEP015OC1/GxGDEP015OC1.h>    // 1.54" b/w

#include <GxIO/GxIO_SPI/GxIO_SPI.h>
#include <GxIO/GxIO.h>

// FreeFonts from Adafruit_GFX
#include <Fonts/FreeMonoBold9pt7b.h>
#include <Fonts/FreeSansOblique9pt7b.h>
#include "Image.c"

#include GxEPD_BitmapExamples

#if defined(ARDUINO_AVR_MEGA2560)

// for SPI pin definitions see e.g.:
// C:\Users\xxx\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\variants\mega\pins_arduino.h

// select one, depending on your CS connection
GxIO_Class io(SPI, /*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9); // arbitrary selection of 8, 9 selected for default of GxEPD_Class
//GxIO_Class io(SPI, /*CS=*/ 10, /*DC=*/ 8, /*RST=*/ 9); // arbitrary selection of 8, 9, CS on 10 (for CS same as on UNO, for SPI on ICSP use)

GxEPD_Class display(io, /*RST=*/ 9, /*BUSY=*/ 7); // default selection of (9), 7


// for SPI pin definitions see e.g.:
// C:\Users\xxx\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\variants\standard\pins_arduino.h

GxIO_Class io(SPI, /*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9); // arbitrary selection of 8, 9 selected for default of GxEPD_Class
GxEPD_Class display(io, /*RST=*/ 9, /*BUSY=*/ 7); // default selection of (9), 7


//#define DEMO_DELAY 3*60 // seconds
//#define DEMO_DELAY 1*60 // seconds
#define DEMO_DELAY 5

void setup(void)
  display.init(115200); // enable diagnostic output on Serial
  Serial.println("setup done");

void loop()
  display.drawBitmap(gImage_image, 0, 0, 400, 400, GxEPD_BLACK);

Thanks for your help

@Alessio03 Salve,

I am impressed by your patience, taking a look at your post from 20.1.2020.

I suggest you take a look at the README.md of the library GxEPD you try to use.

Paged Drawing, Picture Loop for AVR

  • This library uses paged drawing to cope with RAM restriction and missing single pixel update support
  • Paged drawing is implemented using callbacks to callback functions in the user application code,
  • the picture loop is internal to the display classes and calls the callback function as many times as needed,
  • this is a different implementation compared to the picture loop in U8G2 (Oliver Kraus)
  • see also tpictureloop · olikraus/u8glib Wiki · GitHub

GxEPD uses a fixed fraction of the size of the required buffer for graphics for any AVR processor.
The page buffer would fit into RAM on an Arduino UNO, leaving some space for the remaining program. It does not take into account the additional RAM available on Arduino MEGA,

For new users and/or new programs I suggest to use GxEPD2, which is more flexible with page buffer use.
I suggest you start with the example GxEPD2_Example, or GxEPD2_HelloWorld.


thx for your answer!
I was trying to use GxEPD2, but when I run the GxEPD2_Example with the right wires and selecting the right e-paper, the only thing I see is a black border and the old image together.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.