I'm driving an e-Paper display with Adafruit Feather nRF52 Bluefruit LE, code mentioned below but not getting any sharp image. The display starts to get dull as soon as the power goes off. Is there anything I can change in code to retain the display's image quality?
Used library: https://github.com/ZinggJM/GxEPD Software : Arduino IDE
#include <GxEPD.h>
#include <GxGDEH0213B73/GxGDEH0213B73.h> // 2.13" b/w newer panel
#include GxEPD_BitmapExamples
// FreeFonts from Adafruit_GFX
#include <Fonts/FreeMonoBold9pt7b.h>
#include <Fonts/FreeMonoBold12pt7b.h>
#include <Fonts/FreeMonoBold18pt7b.h>
#include <Fonts/FreeMonoBold24pt7b.h>
#include <GxIO/GxIO_SPI/GxIO_SPI.h>
#include <GxIO/GxIO.h>
GxIO_Class io(SPI, /*CS=*/ 4, /*DC=*/ 3, /*RST=*/ 2); // arbitrary selection of 8, 9 selected for default of GxEPD_Class
GxEPD_Class display(io, /*RST=*/ 2, /*BUSY=*/ 5); // default selection of (9), 7
void setup()
{
Serial.begin(115200);
Serial.println();
Serial.println("setup");
display.init(115200); // enable diagnostic output on Serial
Serial.println("setup done");
}
void loop()
{
display.drawPaged(showFontCallback);
delay(5000);
}
void showFontCallback()
{
const char* name = "FreeMonoBold9pt7b";
const GFXfont* f = &FreeMonoBold9pt7b;
display.fillScreen(GxEPD_WHITE);
display.setTextColor(GxEPD_BLACK);
display.setFont(f);
display.setCursor(0, 0);
display.println();
display.println(name);
display.println(" !\"#$%&'()*+,-./");
display.println("0123456789:;<=>?");
display.println("@ABCDEFGHIJKLMNO");
display.println("PQRSTUVWXYZ[\\]^_");
#if defined(HAS_RED_COLOR)
display.setTextColor(GxEPD_RED);
#endif
display.println("`abcdefghijklmno");
display.println("pqrstuvwxyz{|}~ ");
}
Edited: I bought Waveshare Driver-hat separately online not with displays. Datasheet link for the 2.13 display https://drive.google.com/file/d/1ZL9M1V500O0vegqsBbeMTPr0Vli2cNjX/view?usp=sharing