BLOG / ESP8266 / E-Paper Display with ESP8266 — WeAct 4.2…
Blog Post

E-Paper Display with ESP8266 — WeAct 4.2" Wiring & Setup

Viktor Build ~2 min read

Wire a WeAct 4.2 inch e-paper display to an ESP8266 over SPI and get a persistent image that stays even after unplugging — no power needed.

// Manood sa YouTube

E-paper is one of those display technologies that feels a bit different to work with. It holds the image with zero power — no refresh, no backlight, nothing. Once the image is drawn you can unplug the whole thing and it stays there. That makes it useful for anything that doesn't need to update constantly: name tags, dashboards, sensor readings you glance at occasionally.

This is the WeAct 4.2 inch module. Eight pins, runs on 3.3V, and communicates over SPI — even though the labels say SDA and SCL, which looks like I2C. It's not. That confused me for a bit before I actually checked the datasheet.

Parts

  • ESP8266 (NodeMCU or similar)
  • WeAct 4.2" e-paper display module
  • Jumper wires

Wiring

The display has eight pins. Connect them to the ESP8266 as follows:

  • VCC → 3.3V
  • GND → GND
  • SDA → D7 (MOSI)
  • SCL → D5 (CLK)
  • CS → D8
  • D/C → D3
  • RES → D4
  • BUSY → D2

Despite the SDA/SCL labels this is SPI, not I2C. The chip select, data/command, reset, and busy pins are all needed — don't leave any floating.

Libraries

Two libraries from the Arduino Library Manager: GxEPD2 and Adafruit GFX. Install both. GxEPD2 handles the display driver and the page-based rendering loop. Adafruit GFX provides fonts and drawing primitives.

Sketch

The GxEPD2 library uses a page buffer approach — you draw inside a do { ... } while (display.nextPage()) loop. Here's a minimal sketch that prints text to the display:

#include <GxEPD2_BW.h>
#include <Fonts/FreeMonoBold9pt7b.h>

GxEPD2_BW<GxEPD2_420_GDEY042T81, GxEPD2_420_GDEY042T81::HEIGHT> display(
  GxEPD2_420_GDEY042T81(/*CS=*/ D8, /*DC=*/ D3, /*RES=*/ D4, /*BUSY=*/ D2));

void setup() {
  display.init();
  display.setRotation(1);
  display.setFont(&FreeMonoBold9pt7b);
  display.setTextColor(GxEPD_BLACK);
  display.setFullWindow();
  display.firstPage();
  do {
    display.fillScreen(GxEPD_WHITE);
    display.setCursor(10, 30);
    display.print("Hello, World");
  } while (display.nextPage());
}

void loop() {}

Upload and result

Upload the sketch, wait a few seconds while the display initialises, and you'll see the image appear. There's flashing during the refresh — that's normal. E-paper resets all pixels before drawing a new frame, which causes the black/white flicker. Once it's done, the image is locked in. Unplug the power and it stays.

Full code is on my GitHub and linked from my site. If you wire yours up or build something with it, share it in the Discord — I'd like to see what people do with the persistent image.

Tingnan ang buong code sa GitHub →

Sumali sa Komunidad sa Discord

Magtanong, ibahagi ang iyong mga gawa, at makiisa sa mga kapwa maker.

Sumali sa Discord — libre

Nagustuhan mo ang tutorial na ito?

Suportahan ang channel sa Patreon at makakuha ng maagang access sa mga proyekto at higit pa.

Suportahan sa Patreon →