Waveshare e-paper displays with SPI

Thanks for the reply, glad to hear it shouldn't be too hard. I might have to come back for more specific help but I want to try to code a example first along the lines of this first

display.print("Hello World");
writeBitmap(getbuffer()); //no idea but hoping to figure out
//browser refreshes page to get bmp
display.display(true);

Matt

Is it possible to connect the 1.54inch e-ink display to the Arduino MKR 1310 WAN board?

I tried to connect it as MKR 1000 in the file GxEPD2_boards_added.h but it did not work. The display refreshes and then there is just one dot on it almost in the middle.

The Arduino MKR 1310 WAN is close to MKR 1300 WAN as far as I know.
[SOLVED. It works, see my message below.]

@OleksiyM,

If you expect a fast and relevant answer, you should add clickable links to the processor board, e-paper used and connection board used.
I am sure Arduino has a picture with the connection pins and their use.

You get faster answer if I don't need go searching by myself.

If you don't get the expected result on the e-paper, you should observe diagnostic output in the Serial Monitor.
Post this output using code tags, the </>-command symbol.

The pinout in PNG format will be availabe next week!

as of 08.11.2019.

Jean-Marc,
I connected the Arduino MKR 1310 WAN board again, and I tried the example GxEPD2_U8G2_Fonts_Example, and it works OK. I selected mapping suggestion for Arduino MKR1000 in the file GxEPD2_added_boards.h.

I wanted to copy the serial output for debugging, but it turned out there is nothing to debug. It works.

The only thing I changed, I re-soldered a loose wire to the two 1.5V batteries container. Probably, there was not enough current, or I just was not attentive enough. Sorry for trouble.

1.54inch Waveshare black&white e-ink display works all right with the Arduino MKR 1310 WAN board and the GxEPD2 library.

@OleksiyM, thank you for the feedback! :slight_smile:

Hello,

I am testing a Waveshare ePaper 1.54'' module, black and white model, on a Wemo D1 mini.
The code compiles and runs (the debug messages print on the serial console), but nothing prints on the screen :confused:
Note that the ePaper screen works, because I tested it previously on a RPi Zero W, with success.
But it does not work on the Wemo.

Could you please advise?

I use the GxEPD library with the following settings:

#include <GxGDEP015OC1/GxGDEP015OC1.h>  
...
GxIO_Class io(SPI, /*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2); // arbitrary selection of D3(=0), D4(=2), selected for default of GxEPD_Class
GxEPD_Class display(io, /*RST=D4*/ 2, /*BUSY=D2*/ 4); // default selection of D4(=2), D2(=4)

I have connected the screen as follows:

  • 3.3 V to 3.3V, GND to GND
  • Screen's DIN to Wemo D7
  • Screen's CLK to Wemo D5
  • Screen's CS to Wemo D8
  • Screen's DC to Wemo D3
  • Screen's RST to Wemo D4
  • Screen's BUSY to Wemo D2

My code is the following:

#include <GxEPD.h>

// select the display class to use, only one
#include <GxGDEP015OC1/GxGDEP015OC1.h>    // 1.54" b/w
#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=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2); // arbitrary selection of D3(=0), D4(=2), selected for default of GxEPD_Class
GxEPD_Class display(io, /*RST=D4*/ 2, /*BUSY=D2*/ 4); // default selection of D4(=2), D2(=4)

void setup()
{
  // put your setup code here, to run once:

  Serial.begin(115200);
  Serial.println();
  Serial.println("setup");
  display.init();
  display.setRotation(3);
  Serial.println("setup done");
 }

void loop()
{
  Serial.println("loop()");
  showFont("FreeMonoBold24pt7b", &FreeMonoBold24pt7b);

  Serial.println("drawLine");
  display.drawLine(0,60,264,60,GxEPD_BLACK);
  display.drawLine(0,90,264,90,GxEPD_BLACK);
  
  delay(10000);
}

void showFont(const char name[], const GFXfont* f)
{
  Serial.println("showFont()");
  display.fillScreen(GxEPD_WHITE);
  display.setTextColor(GxEPD_BLACK);
  display.setFont(f);
  display.setCursor(0, 0);
  display.println();
  display.println(name);
  display.println("Hello World!");
  Serial.println("< out of showFont()");
}

Thanks!

Axelle

Hi Axelle

  display.update();

is missing.

With GxEPD and full buffered graphics you need to call update() to display the buffer content on the screen.

Did you try GxEPD_Example.ino? This should be the first step.

I recommend to use GxEPD2 for Newbies or new projects.

Jean-Marc

Hi ,

I have a query , The Wave paper 6 inch epaper
https://www.waveshare.com/product/modules/oleds-lcds/e-paper/6inch-e-paper-hat.htm

has <1s refresh rate and it connects to the raspberry pi via spi . I have seen the demo code in the examples show how to display an image on the screen and was wondering

Is it possible to use it as a raspberry pi monitor for simple tasks like using a web browser etc ?

Hi Jean-Marc

ZinggJM:

  display.update();

is missing.

Thanks I had forgotten that indeed :frowning: How silly. Unfortunately it still does not work.
I have taken GxEPD_Example.ino as you have suggested, to be sure.

ZinggJM:
With GxEPD and full buffered graphics you need to call update() to display the buffer content on the screen.

Did you try GxEPD_Example.ino? This should be the first step.

But nothing is shown on the screen. The serial console shows:

_PowerOff : 1
_PowerOn : 9
_Update_Full : 1
_PowerOff : 1
_PowerOn : 1
_Update_Full : 2
_PowerOff : 1
_PowerOn : 1
_Update_Full : 1
_PowerOff : 1
_PowerOn : 1

Can you suggest something more?

Thanks!
Axelle

flyingbaloon:
Hi ,

I have a query , The Wave paper 6 inch epaper
https://www.waveshare.com/product/modules/oleds-lcds/e-paper/6inch-e-paper-hat.htm

has <1s refresh rate and it connects to the raspberry pi via spi . I have seen the demo code in the examples show how to display an image on the screen and was wondering

Is it possible to use it as a raspberry pi monitor for simple tasks like using a web browser etc ?

It would be possible, I think, but I don't know how. And I wouldn't recommend.

You would need to specify what you mean by "as a raspberry pi monitor".
If you mean "for output of a program running on RasPi using EPD driver SW", ok.

@axelleap

If you expect a fast and relevant answer, you should add clickable links to the processor board, e-paper used and connection board used.

This is my standard answer for Newbies.

Either your SPI communication doesn't work, or you have a different e-paper than selected.

Or you connections are not ok.

The Waveshare e-paper boards now have LDO and level converter. The voltage to the e-paper panel may be too low when connected to 3.3V processor.

Jean-Marc

Hello ZingJM, thanks for your excelent GxEPD2 Library.
i really tried my best to search this thread and hope i don't ask this for the 100th time again.

Lately I got the Waveshare 2.9" 3-color(red) e-Ink display and GxEPD2 is a great start and works good for me.

But is was disappointed about the missing partial update of my display or more precise the fact that the complete screens also flashes in slow partial update mode.
After a dive-in into the library and the display spec, i learned that the partial update to RAM seems to work, but still the whole screen would flicker on update, no matter of the choosen partial window.
I stumbled across the fact that GxEPD2_290c::_Update_Full() and GxEPD2_290c::_Update_Part() do not differ.
Out of curiosity i just added the partly update command 0x91 before the refresh command and ended up with the desired behvoir: only the selected partial window gets updated with flickering (& the frame flickers)
The only downside i noticed: you will notice a fine black line around the selected/updated window area. Well i can accept this as a feature, not a bug. :slight_smile:

So is this a bug in the library or intentional?
Will i damage my display only making a full update after a couple of partial updates?
How about adding a "force partial" define to the library if it was intentional ?

Thanks johu

@johumuc,

this is most likely a bug; I will check sometime soon.

Thanks for reporting.

Confirmed to be a bug, a missing feature. Got lost on porting from GxEPD to GxEPD2.
Boarder flashing should be avoidable as well. Other 3-color e-papers need to be checked also.

I am trying to connect the 200x2001.54inch Black&White E-Ink Display to the Heltec ESP32 LoRa (V2) with inbuilt OLED display.

I know from this post at the Heltec forum that it is possible. But for some reason, I cannot do it.

However, I could connect this e-ink display to the another ESP32 LOLIN32 V1.0.0 Board, which does not have an inbuilt OLED display, as this one has. And also to some Arduino boards.

This LoRa board and its inbuilt OLED display working all right. But for some reason the e-ink display does not initiate.

The pins diagram is available here.

[SOLVED] see messages below.

OleksiyM:
I am trying to connect the 200x2001.54inch Black&White E-Ink Display to the Heltec ESP32 LoRa (V2) with inbuilt OLED display.

I know from this post at the Heltec forum that it is possible. But for some reason, I cannot do it.

However, I could connect this e-ink display to the another ESP32 LOLIN32 V1.0.0 Board, which do not have an inbult OLED display, as this one has. And also to some Arduino boards.

This LoRa board and its inbuilt OLED display working all right. But for some reason the e-ink display does not initiate.

The pins diagram is available here.

Hi OleksiyM,

This issue has been reported before, but I couldn't help, as I didn't have the Heltec board.

Now I had bought one and ordered and received a second one recently. But I didn't try with e-paper yet.

I will check sometime soon.

Thank you for the link to the Heltec Forum, it may have the clue to the issue: the e-paper shown doesn't sit on a Waveshare board.

Compare the backside of your e-paper board with the picture of your link. Does it have LDO and level converter added?

See also post #1590, or some earlier post concerning this.

The Waveshare e-paper boards now have LDO and level converter. The voltage to the e-paper panel may be too low when connected to 3.3V processor.

Add a series resistor to BUSY if you connect VCC to 5V for a try, to protect your processor.

Jean-Marc

Did you solder the connection pins to use to the Heltec board? It looks like you need to unscrew the OLED to be able to do this.

Hi Jean-Marc,
I just partially solved it. It is just as it was indicated at the Heltec forum post. This code does connect it and the e-ink display works fine:

#if defined(ESP32)
// select one and adapt to your mapping, can use full buffer size (full HEIGHT)
GxEPD2_BW<GxEPD2_154, GxEPD2_154::HEIGHT> display(GxEPD2_154(/*CS=5*/ 18, /*DC=*/ 22, /*RST=*/ 16, /*BUSY=*/ 23));

Now I will try to connect it with the working LoRa and OLED. The RST wire from the e-ink is not connected to the board at all so far.

Yes. It works all right. I can transmit data via LoRa between two Heltec ESP32 LoRa v2, the inbuilt OLED displays work, and the additional e-ink display works. Thank you!

Hello Jean-Marc,

This is the Waveshare e-Paper I have:

Waveshare e-Paper 1.54 inch from Aliexpress. To my understanding, it is the Waveshare e-Ink 1.54 module, black and white, with connectors.

It is connected to a Wemo D1 mini.

ZinggJM:
@axelleap

This is my standard answer for Newbies.

Either your SPI communication doesn't work, or you have a different e-paper than selected.

Or you connections are not ok.

For the connection, I used:

3.3 V to 3.3V, GND to GND
Screen's DIN to Wemo D7
Screen's CLK to Wemo D5
Screen's CS to Wemo D8
Screen's DC to Wemo D3
Screen's RST to Wemo D4
Screen's BUSY to Wemo D2

Do you see a problem with this?
Other than that, can you suggest a way for me to debug the situation?

ZinggJM:
The Waveshare e-paper boards now have LDO and level converter. The voltage to the e-paper panel may be too low when connected to 3.3V processor.

This blog uses a Wemo D1 with the same eInk 1.54 display, and it works, so I suppose it should work in my case.

Thanks
Axelle

Hi Axelle,

Nouveau 1.54 pouces e-ink écran affichage e-paper Module Support rafraîchissement partiel pour Arduino pour Raspberry Pi

Maybe you have a module with a different panel/controller, GDEH0154D67 instead of GDEP015OC1, which is out of stock at Good Display.

The inking on the flex connector does look different. You could ask the vendor. Does he provide any SW or demo code with it?

I should get a GDEH0154D67 in 2 to 3 weeks.

http://www.e-paper-display.com/products_list/pmcId=29&pageNo_FrontProducts_list01-004=1&pageSize_FrontProducts_list01-004=15.html

Jean-Marc

From the Waveshare wiki page:

The 1.54inch e-Paper is updated to 1.54inch e-Paper V2 version. Codes of the two version are not compatible with each other. Except for the controller and codes, the new V2 version is exactly the same as the old one. If you are users of the old version, you need to update your codes as well for your new order.

https://www.waveshare.com/wiki/1.54inch_e-Paper_Module

There is a fork with support for it: GitHub - sqfmi/GxEPD at GDEH0154D67

ZinggJM:
@johumuc,

this is most likely a bug; I will check sometime soon.

Thanks for reporting.

Confirmed to be a bug, a missing feature. Got lost on porting from GxEPD to GxEPD2.
Boarder flashing should be avoidable as well. Other 3-color e-papers need to be checked also.

Version 1.2.3 of GxEPD2 is available.

  • fixed partial update for 2.13" 3-color and 2.9" 3-color e-paper
  • partial update can be disabled with attribute usePartialUpdateWindow = false
  • added GxEPD2_GFX_Example to show uses of GxEPD2_GFX base class
  • replaced GxEPD2_MultiDisplayExample code, same code as GxEPD2_GFX_MultiDisplayExample
  • added extras/examples/GxEPD2_T_MultiDisplayExample, alternate example using template functions
  • major and minor fixes, such as typos that survived too long

Jean-Marc

Hello,

i just receive 3 new raw displays (Waveshare 1.54 BW). I solder a driver board like before. I compile my code like

before with no changes. I use your GxEPD2 lib. It doesnt work anymore. So i looked at the shop, there was a

hint. The new (V2) displays had a new driver (SSD1681). The old one was (SSD1608). In the Wiki a read that

there is no need to change hardware. But new code ist needed. Did you have this "on screen" and know

something more about?

Thanks