GxEPD2_PP : Particle Display Library for SPI E-Paper Displays

Here is what it says on the GD site!

250*122 resolution 2.13 inch e-paper e-ink display usb GDEH0213B72 substitute for GDEH0213B1
The differences between GDEH0213B72 and GDEH0213B1 :

  1. Different IC driver but be compatible for demo kit
  2. Different parameter but almost be the same

I think I ordered the 0213B1 and got the 0213B72 instead! Could you highlight what you think the parameter differences might be and how I could check they align with the ones in the code?

BTW, Have you ever read the temperature from the display?

Different IC Driver and so new that they don’t provide a link to the driver IC spec. At least the site is accessible again. Maybe it is IL0373. You can verify by trying with GxEPD2_213_flex, it would draw to a part of the display.
If this works, you could adapt the dimension in GxEPD2_213_flex.h. But with Particle libraries this might not be as easy as with Arduino libraries.

No, I have not yet tried. I don’t know if it would work if you connect DIN also to MISO.

For the MISO connection I would need to create my own interface circuit ( I am using their SPI interface adaptors).

I have asked for technical specification (inc. IC driver) for the B72.

I will try what you suggest - not sure I understand your Particle libraries comment. BTW, the library you have posted does not build in the IDE without changes - the #includes do not need “…epd/”. I also use a different GFX library which includes the fonts.

Thank you for the information, I will check. I thought it worked when I checked.
Are you referring to the published GxEPD2_PP library?
I will have to find out how to make changes for test to a published library without publishing the changes before final.

I am still struggling with the Particle development environment, can't install Particle CLI to this PC, so I am not active for this environment for now.

can’t install Particle CLI to this PC,

I assume you are on Windows 10, in which case try - search for CLI Installing as there are posts on issues experienced with this. https://docs.particle.io/tutorials/developer-tools/cli/#installing

I have tried. And I have posted a topic: Windows CLI Installer fails

Have you tried with the Windows CLI Installer or with npm installs? I have had others issues on Windows and I mostly work off of macOS. I do not have Windows 10 Pro with USB3.0 so I can’t confirm or otherwise whether it works.

As you can see in the other post I tried both. I have enough work to do for my Arduino users, so I leave Particle for now.

@ZinggJM It’s understandable - I wasn’t expecting it to be such a hard challenge. I thank you for all your time and effort that you put into it.

I contacted Good Display and they sent me a demo Arduino code for the GDEH0213B72. It took me about 15 minutes to hack it into Particle compatible but now it works pretty well. The update speed is a huge improvement on the previous displays and I understand they have a new technology in development which improves the speed x2. Link to website documents is here: http://www.e-paper-display.com/products_detail/productId=423.html

I now need to roll this into the Adafruit_GFX library so that I can print nice fonts and primitives rather than display stored images.

@armor

You didn't answer these questions so far. If you used the published GxEPD2 library, how do you use it? With the WEB-IDE or the Desktop IDE or Particle CLI, or the new Visual based IDE?

I am still a beginner with Particle tools, and if you report an issue, even if it is just as BTW, then I need complete information.

I do not know how a user can make changes to a published library, nor how the publisher can do that without publishing a new version. All this is no problem in the Arduino world. But with Particle I can't even easily test as a different user, as I would need to transfer ownership of my Photon every time.

@Norfeldt I left only temporarily, and as I get informed about posts to this topic per mail, I am ready for answers.

You didn’t tell me if the published library GxEPD2_PP works for you. Are there issues? How do you use it?

I can only improve if I get feedback, with as complete information as possible.

I just need to start up a noisy notebook if I need to use Particle CLI, everything else is ok on the mini PC box I use for work with Particle.

@ZinggJM :grinning: Glad to hear you haven’t given up on it!

I decided to clear my code and start from scratch since you might have updated the code.

I have imported the Adafruit_GFX_RK (1.3.5) library, but when I trie to import the GXEPD2_PP it just hangs on “Loading…” all the time.

It did not do this when I tried it before Christmas.

1 Like

I had the same problem with the WEB-IDE. I had to set the browser to clear cache on exit, then exit the browser and start again. This worked for me. And it worked again just now, on my Acer notebook with the noisy fan.

I created a new project in the WEB-IDE, loaded library GxEPD2_PP, added it to my new project, loaded GxEPD2_PP again, opened GxEPD2_PP_Example, selected all, and replaced the code of the new project with the selection, and clicked Verify. Verified successfully.

I don’t know if this is the standard way to use library examples for test. But this is how I tried to verify GxEPD2_PP.

Suggestions for testing are welcome.

@ZinggJM I set cleared the cache on exit (tried first to clear it, close and open) for
https://build.particle.io and it worked!

I’m testing it right now.

@ZinggJM Here are some of the results so far

I used your example code from https://github.com/ZinggJM/GxEPD2_PP/blob/master/examples/GxEPD2_PP_Example/src/GxEPD2_PP_Example.ino

Did the following changes

#include <Arduino.h>
#include <Adafruit_GFX.h>
#include <FreeSerifBoldItalic18pt7b.h> // ADDED
#include <FreeMonoBold9pt7b.h>

(changed the setFont to FreeSerifBoldItalic18pt7b where applicable)

#if defined(PARTICLE)
// select one and adapt to your mapping, for buffered drawing, can use full buffer size (full HEIGHT) for Photon
//GxEPD2_BW<GxEPD2_154, GxEPD2_154::HEIGHT> display(GxEPD2_154(/*CS=D5*/ SS, /*DC=*/ A1, /*RST=*/ A0, /*BUSY=*/ D4));
..
//GxEPD2_3C<GxEPD2_583c, GxEPD2_583c::HEIGHT / 4 > display(GxEPD2_583c(/*CS=D5*/ SS, /*DC=*/ A1, /*RST=*/ A0, /*BUSY=*/ D4));
GxEPD2_3C<GxEPD2_750c, GxEPD2_750c::HEIGHT / 4 > display(GxEPD2_750c(/*CS=D5*/ SS, /*DC=*/ A1, /*RST=*/ A0, /*BUSY=*/ D4));
#endif

// comment out unused bitmaps to reduce code space used
// #include "bitmaps/Bitmaps200x200.h" // 1.54" b/w
// #include "bitmaps/Bitmaps128x250.h" // 2.13" b/w
// #include "bitmaps/Bitmaps128x296.h" // 2.9"  b/w
// #include "bitmaps/Bitmaps176x264.h" // 2.7"  b/w
// #include "bitmaps/Bitmaps400x300.h" // 4.2"  b/w
//#include "bitmaps/Bitmaps640x384.h" // 7.5"  b/w // can't select together with the others for Photon
// 3-color
// #include "bitmaps/Bitmaps3c200x200.h" // 1.54" b/w/r
// #include "bitmaps/Bitmaps3c104x212.h" // 2.13" b/w/r
// #include "bitmaps/Bitmaps3c128x296.h" // 2.9"  b/w/r
// #include "bitmaps/Bitmaps3c176x264.h" // 2.7"  b/w/r
#include "bitmaps/Bitmaps3c400x300.h" // 4.2"  b/w/r

As you can see there seems to be some issue with the Hello Android and Hello E-Paper.


Is this a correct understanding of the following

void helloWorld()
{
  //Serial.println("helloWorld");
  display.setRotation(1);
  display.setFont(&FreeSerifBoldItalic18pt7b);
  display.setTextColor(GxEPD_BLACK);
  uint16_t x = (display.width() - 160) / 2;
  uint16_t y = display.height() / 2;
  display.setFullWindow();
  display.firstPage();
  do
  {
    display.fillScreen(GxEPD_WHITE);
    display.setCursor(x, y);
    display.println("Hello World!");
  }
  while (display.nextPage());
  //Serial.println("helloWorld done");
}

The display.firstPage() triggers some sort of async function that returns True when calling display.nextPage() for some period of time and then when ready (display print finish) it returns False and can exit the loop?


It’s not drawing any bitmaps. So uncommented this section back to the original setup.

// comment out unused bitmaps to reduce code space used
#include "bitmaps/Bitmaps200x200.h" // 1.54" b/w
#include "bitmaps/Bitmaps128x250.h" // 2.13" b/w
#include "bitmaps/Bitmaps128x296.h" // 2.9"  b/w
#include "bitmaps/Bitmaps176x264.h" // 2.7"  b/w
#include "bitmaps/Bitmaps400x300.h" // 4.2"  b/w
//#include "bitmaps/Bitmaps640x384.h" // 7.5"  b/w // can't select together with the others for Photon
// 3-color
#include "bitmaps/Bitmaps3c200x200.h" // 1.54" b/w/r
#include "bitmaps/Bitmaps3c104x212.h" // 2.13" b/w/r
#include "bitmaps/Bitmaps3c128x296.h" // 2.9"  b/w/r
#include "bitmaps/Bitmaps3c176x264.h" // 2.7"  b/w/r
#include "bitmaps/Bitmaps3c400x300.h" // 4.2"  b/w/r

Now some of the logo bitmaps are back

I would LOVE to print some of my own photos onto the display.

To answer your questions:

  1. I was referring to the GxEPD2_PP library.
  2. I am not well placed to help you with published libraries as I have not published anything yet.

I am using the Web IDE. Typically I include a library in my project sometimes I copy and recreate the files and change them. I also use VSC (for the better editor) but not at the moment with the Particle extensions - waiting for a good beta version.

I originally asked if anyone knew of a library to drive e-paper displays and @peekay123 referred me to your Arduino github GxEPD library. I then found the GxEPD2 library. I figured out how it fitted together copied the files I needed and created .h and .cpp files in the Web IDE as needed. I then stripped out all the Arduino related stuff that is not necessary in the Particle space and worked through the compile errors until it compiled and then I flashed to a test Photon wired up to a 2.13" 3 colour display.

@armor

BTW, the library you have posted does not build in the IDE without changes - the #includes do not need “…epd/”.

I do not understand this, as it works for me with the WEB-IDE.

Yes, there is an issue with missing clipping of drawing to a partial window. See
https://github.com/ZinggJM/GxEPD2/issues/4

The display.firstPage() triggers some sort of async function that returns True when calling display.nextPage() for some period of time and then when ready (display print finish) it returns False and can exit the loop?

display.firstPage() simply sets the graphics class to paged mode. Nothing asynchronous involved.

display.nextpage() transfers the buffer content - the page - to the controller. For the last page the controller is ordered to refresh the screen. For displays with "fast partial update" aka differential update, there is as second round to make both controller buffers have the same content. Then false is returned.

It’s not drawing any bitmaps. So uncommented this section back to the original setup.

Don't understand what you mean. Aha, you had selected the wrong bitmaps for your b/w display:

#include "bitmaps/Bitmaps3c400x300.h" // 4.2"  b/w/r

These are the bitmaps for your display:

#include "bitmaps/Bitmaps640x384.h" // 7.5"  b/w // can't select together with the others for Photon

These bitmaps are drawn to any display, if uncommented:

 #include "bitmaps/Bitmaps200x200.h" // 1.54" b/w

Okay, I read it like I could pick different sizes (since the 200x200 worked on my 7.5"). I tried the b/w for 7.5" and it works perfect! I can live without the red color - perhaps I can print some red text instead.

Suppose I wish to print a custom logo like this:

customLogo

How would I go about that? Let's start with just adding it as a file that is falshed to the device.

BMP file can be downloaded from here:

https://www.dropbox.com/sh/j75sq28krn9raru/AAASd8J1qV28bJyUBQUAMiqea?dl=0


Okay - I think I understand it. So it actually only goes 1 iteration in the helloWorld().

Then in the helloFullScreenPartialMode() the if statements makes calls to the display telling it that it needs to do more iteration before the last page is reached.
So display.epd2.hasFastPartialUpdate returns True once (things are added to the buffer) and then in the next iteration it returns False. Then it comes to display.epd2.hasPartialUpdate that sorta does the same thing to get another iteration.

Right?