I'm attempting to use a Waveshare 1.54" LCD with my generic-brand Arduino Uno. I successfully connected and implemented the Waveshare demo code to test the hardware, but GxEPD2_HelloWorld.ino just isn't working. It compiles and returns data, but the display shows nothing.
Another discussion indicated that I probably have a GDEP015OC1 display. It is attached as shown:
// uncomment next line to use class GFX of library GFX_Root instead of Adafruit_GFX
//#include <GFX.h>
#include <GxEPD2_BW.h>
#include <GxEPD2_3C.h>
#include <GxEPD2_4C.h>
#include <GxEPD2_7C.h>
#include <Fonts/FreeMonoBold9pt7b.h>
// select the display class and display driver class in the following file (new style):
//#include "GxEPD2_display_selection_new_style.h"
// or select the display constructor line in one of the following files (old style):
//#include "GxEPD2_display_selection.h"
//#include "GxEPD2_display_selection_added.h"
// alternately you can copy the constructor from GxEPD2_display_selection.h or GxEPD2_display_selection_added.h to here
// e.g. for Wemos D1 mini:
//GxEPD2_BW<GxEPD2_154_D67, GxEPD2_154_D67::HEIGHT> display(GxEPD2_154_D67(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEH0154D67
#define MAX_DISPLAY_BUFFER_SIZE 800 //
#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_154, MAX_HEIGHT(GxEPD2_154)> display(GxEPD2_154(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEP015OC1 200x200, IL3829, no longer available
// for handling alternative SPI pins (ESP32, RP2040) see example GxEPD2_Example.ino
void setup()
{
//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
helloWorld();
display.hibernate();
}
const char HelloWorld[] = "Hello World!";
void helloWorld()
{
display.setRotation(1);
display.setFont(&FreeMonoBold9pt7b);
display.setTextColor(GxEPD_BLACK);
int16_t tbx, tby; uint16_t tbw, tbh;
display.getTextBounds(HelloWorld, 0, 0, &tbx, &tby, &tbw, &tbh);
// center the bounding box by transposition of the origin:
uint16_t x = ((display.width() - tbw) / 2) - tbx;
uint16_t y = ((display.height() - tbh) / 2) - tby;
display.setFullWindow();
display.firstPage();
do
{
display.fillScreen(GxEPD_WHITE);
display.setCursor(x, y);
display.print(HelloWorld);
}
while (display.nextPage());
}
void loop() {};
I need an e-ink display supported by GxEPD2 ASAP; there's a piece of code for a hackathon project that relies on it. Can you suggest an alternative I can purchase from Amazon or another rapid vendor?
I would suggest Good Display. Then you know the display panel you get. You can order delivery by Fedex or DHL, then it comes quite fast. But shipping is more expensive than the panel.
For any other possible sources, you need to make sure they know the panel source and name, to check if it is supported by GxEPD2.
Did you check the constructor parameters correspond to your wiring?
I have just ordered this display from Waveshare through their shop on AliExpress.
There have been previous posts concerning this display. So I will add support for it in GxEPD2.
The display should arrive in about 10 days. I am aware that this may be too late for you.
-jz-
Concerning alternatives: I have one board named MH-ET LIVE with a GDEH0154D67 panel, inking (HINK-E154A07-A1), on it. But I don't know what panel they currently use. And it doesn't have level converters on board.
And there are boards from TZT and TTGo, don't know current panel either.
The board has a V2 sticker on it, and the inking on the flexible connector of the panel reads FPC-B001 20.05.21.
It is the same inking as found on my GDEY0154D67 I have from Good Display.
And it works with my driver class GxEPD2_154_GDEY0154D67.
This means the controller of the panel has its OTP programmed with waveform tables for full and for partial refresh.
I have no idea how many Waveshare boards with panels with inking HINK-E0154A05-A2 2018.12.26 have been produced (by Waveshare or cloners), and how many of them have no waveform tables in OTP. But obviously there have been, indicated by the update on their demo code version for V2.
As I don't have this (interim?) version, there will be no support for it in GxEPD2.
-jz-