Skip to content

todd-herbert/heltec-eink-modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heltec E-Ink Modules

Third-party Arduino Library for Heltec E-Ink Displays.
Run-time drawing, using Adafruit-GFX.

Read the API

Vision Master

See Getting Started with Vision Master for instructions on setting up Arduino IDE or PlatformIO.
(Important platformio.ini config)

Model Driver Class Front Image Rear Image Resolution (px)
E213 EInkDisplay_VisionMasterE213 Front Rear 250 x 122
E290 EInkDisplay_VisionMasterE290 Front Rear 296 x 128
#include "heltec-eink-modules.h"

EInkDisplay_VisionMasterE213 display;

void setup() {
    display.print("Hello, World!");
    display.update();
}

void loop() {}

Wireless Paper

See Getting Started with Wireless Paper for instructions on setting up Arduino IDE or PlatformIO.
(Important platformio.ini config)

Hardware Version Driver Class Flex Connector Label Front Image Rear Image
V1.1 EInkDisplay_WirelessPaperV1_1 (not visible) Front Rear, with sticker
Original (V1.0) EInkDisplay_WirelessPaperV1 FPC-7528B Front Rear
#include "heltec-eink-modules.h"

EInkDisplay_WirelessPaperV1_1 display;

void setup() {
    display.print("Hello, World!");
    display.update();
}

void loop() {}

A low power state is available for the whole board (18μA while sleeping).

SPI Displays

Identification

Pay attention to the model name: you will need it to use the library.

1.54 Inch

Model Name Flex Connector Label Front Image Rear Image Colors Screen Protector Resolution (px) Fastmode (partial refresh)
DEPG0154BNS800 FPC-7525 Front Rear Black, White Red Tab 152 x 152 Yes
DEPG0150BNS810 FPC-8101 Front Rear Black, White Red Tab 200 x 200 Yes
GDEP015OC1 ? HINK-E0154A05-A2 Front Rear Black, White Blue Tab 200 x 200 Yes

2.13 Inch

Model Name Flex Connector Label Front Image Rear Image Colors Screen Protector Resolution (px) Fastmode (partial refresh)
DEPG0213RWS800 FPC-7528B Front Rear Black, White, Red Red Tab 250 x 122 No
QYEG0213RWS800 FPC-7528 Front Rear Black, White, Red Red Tab 250 x 122 No

2.9 Inch

Model Name Flex Connector Label Front Image Rear Image Colors Screen Protector Resolution (px) Fastmode (partial refresh)
DEPG0290BNS800 FPC-7519 rev.b Front Rear Black, White Red Tab 296 x 128 Yes
DEPG0290BNS75A  FPC-750 Front Rear Black, White Red Tab 296 x 128 Yes
GDE029A1 SYX-1553 Front Rear Black, White Blue Tab 296 x 128 Yes

Wiring

Warning: in some cases, connecting directly to the display will cause damage!
See your boards's wiring page for specific information:

// Specify your wiring when declaring the display
DEPG0150BNS810 display(dc, cs, busy);

// Optional: specify SDI and CLK (ESP32 & SAMD21* only)
DEPG0150BNS810 display(dc, cs, busy, sdi, clk)

See here for limitations of SAMD21G18A wiring


Should I use update() or DRAW()?

The DRAW() operation allows for RAM saving tricks (paging). Required for older boards, configurable for new boards. More info about DRAW() here.

/* 
  Use DRAW() if:
   - you need to support Arduino Uno R3 / Mega 2560, or
   - you desperately need to save RAM
*/
    DRAW(display) {
        display.print("Hello, ");
        dispaly.print("World!");
    }


// Otherwise, you're free to use update() instead
    display.clearMemory();
    display.print("Hello, ");
    display.print("World!");
    display.update();

Drawing

Shapes and Text

Drawing operations come from the Adafruit GFX library You'll find a full list of supported commands in the API. Check out the examples folder to see them in action. Alternatively, the official adafruit-gfx tutorial is a good place to start.

Fonts

The library comes with a selection of custom fonts. You can create more with truetype2gfx.
See the Fonts example.

Images

As decided by the Adafruit library, the ancient "XBitmap" is the format of choice for pre-rendered graphics. Luckily, GIMP maintains good support for it. If you need a hint on how to use it, I have thrown together a tutorial on preparing XBitmap images.

SD card

It is possible to load and save .bmp images, using a cheap SD card SPI adapter. Read more

Fast Mode (Partial Refresh)

E-Ink displays generally take several seconds to refresh. Some displays have an alternative mode, where the image updates much faster.

The trade-off is that images drawn in fast mode are of a lower quality. The process may also be particularly difficult on the hardware. Use sparingly.

Not all displays support fast mode.

Call fastmodeOn() to enable.
Call fastmodeOff() to return to normal.

* Technically, this mode is not a true "partial refresh", as the whole display image is updated.

Troubleshooting

  • Double-check your wiring
    On breadboard, or header pins, it is easy to be one row out.
    Make sure to use a level-shifter, if needed.

  • Double-check your constructor

    // Make sure to use the correct class for your display model
    EInkDisplay_WirelessPaperV1_1 display;
    
    // SPI displays: make sure your pins are set correctly
    DEPG0150BNS810 display(dc, cs, busy);   
  • Take a look at the examples, and the API
    Some commands might not work the way you would expect. If unsure, double check.

  • Disconnect and Reconnect
    If the display has been used incorrectly, it can get "stuck".
    Remove all power from the display and Arduino for 5 seconds.

  • Make sure your build enviorment is configured correctly

Installation

Arduino

Library can be installed to Arduino IDE with Sketch -> Include Library -> Add .Zip Library.., or through the built-in Library Manager.

PlatformIO

Available through the built-in library registry, or alternatively, can be installed by extracting the Zip file to the lib folder of your project.

For Vision Master and Wireless Paper boards, your platformio.ini file needs to be correctly configured.

Acknowledgements