Really? Then the solution would apply!
Don't hijack a solved topic!
Really? Then the solution would apply!
Don't hijack a solved topic!
Sorry, if i post, it's maybe that it does not work even if apply the solution. And this the case.
Do you want a new topic on this forum with the same items?
I don't want anything.
But if you create a new topic with all relevant information, you might get some help.
Provide a link to your display, provide the inking you can see on the flexible connector.
Provide (again) the display selection.
Provide the processor used and the wiring used.
Did you try all available driver classes for your 4.2" panel?
See also: ESP32-S3 + Waveshare 4.2 e-ink + GxEPD2 - #12 by tonedef
If it helps, I felt a little overwhelmed when trying to get these to work. The examples, for completeness, cover tons of stuff (which is awesome), but in the end you really don't need much code.
One file like the following, will suffice to show a 4 tone grayscale image. Note this uses @ZinggJM 's GxEPD2_4G library for grayscale, an extensions of ZinngIM's GxEPD2 library:
#define ENABLE_GxEPD2_GFX 1
#include <GxEPD2_4G_4G.h>
#include <bitmaps/drizzle_sun.h>
// These three lines values are what you need to figure out for your panel
#define GxEPD2_DISPLAY_CLASS GxEPD2_4G_4G
#define GxEPD2_DRIVER_CLASS GxEPD2_420_GDEY042T81
GxEPD2_4G_4G<GxEPD2_420_GDEY042T81, GxEPD2_420_GDEY042T81::HEIGHT> display(GxEPD2_420_GDEY042T81(/*CS=5*/ 26, /*DC=*/ 25, /*RST=*/ 33, /*BUSY=*/ 32)); // GDEY042T81, 400x300, SSD1683 (no inking)
void setup()
{
display.init(115200, true, 2, false); // USE THIS for Waveshare boards with "clever" reset circuit, 2ms reset pulse
showImage();
display.hibernate();
}
void loop() {}
void showImage()
{
const unsigned char* bitmaps[] = { drizzle_sun };
display.drawImage_4G(bitmaps[0], 2, 0, 0, 300, 400, true, false, true);
}
In hind site, IMHO the procedure to use is:
Note which board you have ESP8266, ESP32, ARDUINO STM32, etc
Open one of the examples, like
GxEPD2-master\examples\GxEPD2_HelloWorld
In that folder, look for your board in GxEPD2_display_selection.h (e.g. #if defined(ESP32) for an ESP32 board)
Under that, find the W x H size of your panel under the number of colors your panel has (note: you may have to look under GxEPD2_display_selection_added.h if you're not finding it) e.g. for a 3 color e-paper that is 128x296, it's either:
//GxEPD2_3C<GxEPD2_290_Z13c, GxEPD2_290_Z13c::HEIGHT> display(GxEPD2_290_Z13c(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEH029Z13 128x296, UC8151D
or
//GxEPD2_3C<GxEPD2_290_C90c, GxEPD2_290_C90c::HEIGHT> display(GxEPD2_290_C90c(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEM029C90 128x296, SSD1680
One of these will be your panel. If you're unsure which one is yours, or things aren't working, jot them down, as you will cycle thru them until you get a working panel.
Open GxEPD2_display_selection_new_style.h. From here, you're looking for the display class, and the driver for your panel.
For the display class, under // select the display class pick the one that matches the number of colors you have, e.g. for a 3 color display it's #define GxEPD2_DISPLAY_CLASS GxEPD2_3C. Note that grayscale is BW (i.e. black and white). These will work for grayscale panels, but if you want to use the grayscale try the 4G lib I mentioned earlier.
For the driver, as with the panel, find the driver with the same dimensions as your panel under // select the display driver class (only one) for your panel. You may find several. E.g. for a 128x296 panel you'll find several.
Now, for your code, you have your DISPLAY_CLASS and you may one or more options for your DRIVER_CLASS and one or more options for your panel.
Start with the DRIVER_CLASS that makes the most sense, and cycle thru your panel choices until your panel works. If none do, select the next DRIVER_CLASS and try again. Repeat.
Also, if you're new to these MCU's note that they're all slightly different in how pin assignments work. Sanity check that you know that the pin you're specifying in code physically translates to the pin you expect on the actual board. IOW, on my ESP32 board GPIO33, is 33 in code but physically it's pin 8 on the board.
The other "gotcha" is where DIN (MOSI) and CLK (SCK) wind up. In arduino, those are mapped for you, and if you run your "Core Debug Level" as "Verbose", those pin mappings should show up for you in the Arduino IDE Serial Monitor:
------------------------------------------
GPIO Info:
------------------------------------------
GPIO : BUS_TYPE[bus/unit][chan]
--------------------------------------
1 : UART_TX[0]
3 : UART_RX[0]
18 : SPI_MASTER_SCK[3]
19 : SPI_MASTER_MISO[3]
23 : SPI_MASTER_MOSI[3]
25 : GPIO
26 : GPIO
32 : GPIO
33 : GPIO
============ After Setup End =============
Thanks, I read these links and articles, but I really a neophyte.
Here my configuration :
(GPIOXX) NodeMCU-32S <-> e-Paper Driver Hat Rev2.3
(NOGPIO) 3v3 <-> PWR
(GPIO13) p13 <-> BUSY
(GPIO12) p12 <-> RST
(GPIO14) p14 <-> DC
(GPIO27) p27 <-> CS
(GPIO18) p18 <-> CLK
(GPIO23) p23 <-> DIN
(NOGPIO) GND <-> GND
(not use) <-> VCC
I test this 4 DRIVER_CLASS
## On GxEPD2_display_selection_new_style.h
GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 27, /*DC=*/ 14, /*RST=*/ 12, /*BUSY=*/ 13)); // Good Display ESP32 Development Kit ESP32-L
#define GxEPD2_DRIVER_CLASS GxEPD2_420 // GDEW042T2 400x300, UC8176 (IL0398), (WFT042CZ15)
#define GxEPD2_DRIVER_CLASS GxEPD2_420_M01 // GDEW042M01 400x300, UC8176 (IL0398), (WFT042CZ15)
#define GxEPD2_DRIVER_CLASS GxEPD2_420_GDEY042T81 // GDEY042T81 400x300, SSD1683 (no inking)
#define GxEPD2_DRIVER_CLASS GxEPD2_420_GYE042A87 // GYE042A87, 400x300, SSD1683 (HINK-E042-A07-FPC-A1)
But these 4 DRIVER seems not work (I tested each), I think it's maybe the Display class is wrong. I tested it on my raspberry (because with e-Paper Driver Hat Rev2.3 we can do it) and my display work.
I will test the GxEPD2_display_selection.h.