The EPD47 is an ePaper equipped ESP32 microcontroller board from Lilygo, featuring Wifi and Battery management. In practical terms, getting these to work presents no significant challenges. Thankfully the board is equipped with USB-C connector which performs well and feels better to use than the flimsy USB-micros.
This post is to offer a few simple practical tips based on limited experience. Please note for reference my page “ePaper Display” which deals with some application and design considerations.
Coding EDP47 with Arduino
I found the API a little arcane and so adopted several useful functions to make life a little easier.
For example to output text to the screen we are offered:
writeln((GFXfont *)&FiraSans, "This is a test", &cursor_x, &cursor_y, NULL);
… and so to get an integer variable would need something like:
writeln((GFXfont *)&FiraSans, (char *)voltage.c_str(), &cursor_x, &cursor_y, NULL);
…once a string “voltage” has been developed from the float variable added to suitable text.
Some simple functions make life a bit easier.
void setFont(GFXfont const &font) {
currentFont = font;
}
void drawString(int x, int y, String text) {
char * data = const_cast<char*>(text.c_str());
write_string(¤tFont, data, &x, &y, framebuffer);
}
void drawPixel(int x, int y, uint8_t color) {
epd_draw_pixel(x, y, color, framebuffer);
}
void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color) {
epd_write_line(x0, y0, x1, y1, color, framebuffer);
}
void fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) {
epd_fill_rect(x, y, w, h, color, framebuffer);
}
void epd_update() {
epd_draw_grayscale_image(epd_full_screen(), framebuffer); // Update the screen
}
So, for example:
drawString(x,y,"This is cool"); drawString(x,y+50, String(Temp_at_s1)); // Followed by.... epd_update();
… would send those data to the screen.
Pixels, lines, rectangles and graphs
I was surprised at the fine resolution of the display. In fact pixel maps and lines drawn for line graphs turned out to be barely visible to my ageing eyesight. The observer will note that my graphs in the illustrated project are drawn with grey rectangles in the colour 0xDD.
Print a box
Thingiverse turned up a couple of projects for 3d printed housings suitable for the EPD47. I have used this one with great success, although my printer has so far failed at printing the tiny buttons !


Going to sleep
The whole point of ePaper has to be centred on power efficiency.
The are two fundamental processes in hand:
- esp_deep_sleep_start(); which speaks for itself, and
- epd_poweroff_all(); which turns off the display helpfully leaving the most recent screen showing.
To be continued…..