G6EJD / ESP32-e-Paper-Weather-Display

An ESP32 and 2.9", 4.2" or 7.5" ePaper Display reads Weather Underground data via their API and then displays the weather
Other
959 stars 206 forks source link

Support for WaveShare 7 color Waveshare 5.65inch E-Paper Display Module 600×448 display and weather warnings #156

Closed AWSW-de closed 3 years ago

AWSW-de commented 3 years ago

Hello G6EJD,

first of all my 640x384 and 800x480 weather stations still run without any issues... One of them with a 10000mAh battery now for over 20 months and still does not want to be recharged. Everybody who sees the display for the first time is fascinated. So really good work from you. Thanks again. :)

I have a question about the WaveShare 7 color Waveshare 5.65inch E-Paper Display Module 600×448 display. I would like to use the weather station with this display to be able to add weather warnings in different colors. I use this function already on a smart mirror and it works out really great to see if some bad weather is on the way...

I already tried the 7 color display with the latest GxEPD2 library and the standard cabling following your wiring setup, which I use for all of my projects with LOLIN D32 boards and WaveShare e-Paper displays, but I am struggling how to set the code because the settings in GxEPD2 do not seem to fit to the wiring I guess, but I think I did not get the idea to change that fitting to the in the pictures shown wiring.

I already searched a lot on the internet as well as within the informations given by GxEPD2, but I cannot solve it so far... :(

Can you give me a hint to this? If you have no time, that's fine. I will try it then on my own...

Thanks a lot for your reply in advance.

Kind regards AWSW

1

2

3

G6EJD commented 3 years ago

Hi,

The GxEPD2 library supports that display, the object line is;

GxEPD2_7C < GxEPD2_565c, GxEPD2_565c::HEIGHT / 2 > display(GxEPD2_565c(/CS=5/ SS, /DC=/ 17, /RST=/ 16, /BUSY=/ 4)); // Waveshare 5.65" 7-color

That is the only line you need to change in the weather programme, the display uses the standard SPI bus connections or you can redefine them.

All you’d need to do then is select the colours you need at various locations.

Regards

David

From: AWSW2017 Sent: 27 August 2021 19:56 To: G6EJD/ESP32-e-Paper-Weather-Display Cc: Subscribed Subject: [G6EJD/ESP32-e-Paper-Weather-Display] Support for WaveShare 7 color Waveshare 5.65inch E-Paper Display Module 600×448 display and weather warnings (#156)

Hello G6EJD, first of all my 640x384 and 800x480 weather stations still run without any issues... One of them with a 10000mAh battery now for over 20 months and still does not want to be recharged. Everybody who sees the display for the first time is fascinated. So really good work from you. Thanks again. :) I have a question about the WaveShare 7 color Waveshare 5.65inch E-Paper Display Module 600×448 display. I would like to use the weather station with this display to be able to add weather warnings in different colors. I use this function already on a smart mirror and it works out really great to see if some bad weather is on the way... I already tried the 7 color display with the latest GxEPD2 library and the standard cabling following your wiring setup, which I use for all of my projects with LOLIN D32 boards and WaveShare e-Paper displays, but I am struggling how to set the code because the settings in GxEPD2 do not seem to fit to the wiring I guess, but I think I did not get the idea to change that fitting to the in the pictures shown wiring. I already searched a lot on the internet as well as within the informations given by GxEPD2, but I cannot solve it so far... :( Can you give me a hint to this? If you have no time, that's fine. I will try it then on my own... Thanks a lot for your reply in advance. Kind regards AWSW

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

AWSW-de commented 3 years ago

Hello David,

thanks a lot for you quick reply. I will give it a try later.

Have a nice day and kind regards

Axel

AWSW-de commented 3 years ago

Hello David, this helped a lot. I got some progress now. Thanks again.

I used your newest example "Waveshare_7_5_T7.ino" and changed/added the following lines:

Settings in the owm_credentials file of course...

//#include //#include

include

//#include "lang.h" // Localisation (English) //#include "lang_cz.h" // Localisation (Czech) //#include "lang_fr.h" // Localisation (French)

include "lang_gr.h" // Localisation (German)

define SCREEN_WIDTH 600 // Set for landscape mode

define SCREEN_HEIGHT 448

// ORG 7_5_T7: GxEPD2_BW<GxEPD2_750_T7, GxEPD2_750_T7::HEIGHT> display(GxEPD2_750_T7(/CS=/ EPD_CS, /DC=/ EPD_DC, /RST=/ EPD_RST, /BUSY=/ EPD_BUSY)); // B/W display // GxEPD2_3C<GxEPD2_750c, GxEPD2_750c::HEIGHT> display(GxEPD2_750(/CS=/ EPD_CS, /DC=/ EPD_DC, /RST=/ EPD_RST, /BUSY=/ EPD_BUSY)); // 3-colour displays // use GxEPD_BLACK or GxEPD_WHITE or GxEPD_RED or GxEPD_YELLOW depending on display type GxEPD2_7C < GxEPD2_565c, GxEPD2_565c::HEIGHT / 2 > display(GxEPD2_565c(/CS=5/ SS, /DC=/ 17, /RST=/ 16, /BUSY=/ 4)); // Waveshare 5.65" 7-color

Now it "speaks" with the display... That's fine, but i think the display is damaged somehow in the half of the height, because it does not draw anything below the half height as shown in the picture:

565

I also tried to draw a additional rectangle around the edges as shown in the picture with the following line without success:

display.drawRect(0, 0, 600, 448, GxEPD_BLACK); // DISPLAY TEST

I just ordered a new display to see if it is really hardware related or not. Maybe you have an idea?

Thanks and have a nice weekend. :)

Kind regards Axel

G6EJD commented 3 years ago

Hi Axel,

It looks like you chose the half-size buffer option of the GxEPD2 driver, I would try out his examples with your display selected.

Regards

David

On 28 Aug 2021, at 10:53, AWSW2017 @.***> wrote:

 Hello David, this helped a lot. I got some progress now. Thanks again.

I used your newest example "Waveshare_7_5_T7.ino" and changed/added the following lines:

Settings in the owm_credentials file of course...

//#include //#include

include

//#include "lang.h" // Localisation (English) //#include "lang_cz.h" // Localisation (Czech) //#include "lang_fr.h" // Localisation (French)

include "lang_gr.h" // Localisation (German)

define SCREEN_WIDTH 600 // Set for landscape mode

define SCREEN_HEIGHT 448

// ORG 7_5_T7: GxEPD2_BW<GxEPD2_750_T7, GxEPD2_750_T7::HEIGHT> display(GxEPD2_750_T7(/CS=/ EPD_CS, /DC=/ EPD_DC, /RST=/ EPD_RST, /BUSY=/ EPD_BUSY)); // B/W display // GxEPD2_3C<GxEPD2_750c, GxEPD2_750c::HEIGHT> display(GxEPD2_750(/CS=/ EPD_CS, /DC=/ EPD_DC, /RST=/ EPD_RST, /BUSY=/ EPD_BUSY)); // 3-colour displays // use GxEPD_BLACK or GxEPD_WHITE or GxEPD_RED or GxEPD_YELLOW depending on display type GxEPD2_7C < GxEPD2_565c, GxEPD2_565c::HEIGHT / 2 > display(GxEPD2_565c(/CS=5/ SS, /DC=/ 17, /RST=/ 16, /BUSY=/ 4)); // Waveshare 5.65" 7-color

Now it "speaks" with the display... That's fine, but i think the display is damaged somehow in the half of the height, because it does not draw anything below the half height as shown in the picture:

I also tried to draw a additional rectangle around the edges as shown in the picture with the following line without success:

display.drawRect(0, 0, 600, 448, GxEPD_BLACK); // DISPLAY TEST

I just ordered a new display to see if it is really hardware related or not. Maybe you have an idea?

Thanks and have a nice weekend. :)

Kind regards Axel

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

AWSW-de commented 3 years ago

Hi David,

I tried every setting from his HelloWorld example without success. The height only gets smaller. When I try to raise it via the setting ::height or the max buffer size named in some settings it does not compile any more because of an overflow….

I will try with a new display the next days.

Have a nice weekend.

Thanks a lot.

Regards Axel

GeorgH93 commented 3 years ago

Hi Axel,

you have to change two things. Like David already wrote you have to change the display to GxEPD2_7C < GxEPD2_565c, GxEPD2_565c::HEIGHT / 2 > display(GxEPD2_565c(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // Waveshare 5.65" 7-color. The display however has to many pixel for the limited ram of the ESP32 and therefore must be used in paged mode, the GxEPD2_565c::HEIGHT / 2 part defines that it should use two pages (each have the screen). To now draw on the entire screen, you have to run the draw code twice. and disable the full screen update. For this you have to replace this:

        DisplayWeather();
        display.display(false); // Full screen update mode

with this:

        display.firstPage();
        do {
          DisplayWeather();
        } while (display.nextPage());
AWSW-de commented 3 years ago

Hello GeorgH93,

thanks a lot for the hint. That solved my problem.

Kind regards Axel

bild

AWSW-de commented 3 years ago

Thanks a lot to you both. I think my issue is closed.

muelli01 commented 2 years ago

Sorry for posting to this closed topic, but I have a question about the last posted picture. It seems there are parts of the info missing on the right and bottom side of the display. Can this be fixed? Just wondering as I am thinking about buying this display as well.... Thanks!

G6EJD commented 2 years ago

The reason is the display resolution is slightly less for example x is 600 versus 640 on the b/w screen, so the drawing statements need to be moved to the left to get everything to fit, same with the y statements.