This post describes how to connect the 2.7″ ePaper display development module from Embedded Artists to the ESP8266. ePapers are very interesting in the IoT field since they only require power during the update. Depending on the type of display they can then maintain the image while the connect micro controller goes back to sleep.
Connecting this display required a bit of creative thinking. At first I thought that the ESP8266 wouldn’t have enough pins to connect the display. I decided to strip some aspects and I’m honestly not 100% sure what the side effects are. The board comes with a temperature sensor and I decided to set the temperature manually to save pins. This probably yields better quality for displayed pictures.
Another problem was to figure out how the pins on the connector were arranged. Here the following schematic helped:
So here is how you connect it:
|ePaper Function||ePaper PIN||NodeMCU (Generic)||ESP Function|
|UART TX||8||D4 (2)|
|EPD Reset||12||D0 (16)|
|EPD Panel On||13||D2 (4)|
|EPD Discharge||14||D1 (5)|
When you have connected the display download this sample code:
I adjusted my OLED library for the SSD1306 to the ePaper display. It has the advantage that you first create the content of the ePaper display in a buffer. When you are ready to write everything to the display call the appropriate method and the content of the buffer will be written to the display. The library currently supports the following function:
- Draw Text at a given location. Define text alignment and get information how much space the text will consume
- Create custom font files with http://oleddisplay.squix.ch/ and include them in your firmware
- Draw lines, circles, boxes and fill them
I hope to extract a library from it but until then just use the demo code to get started with your own project.
A ridiculous amount of coffee was consumed in the process of building this post/project. Add some fuel if you'd like to keep me going!