# Quickstart using Adafruit eInk/ePaper displays with CircuitPython

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/083/246/medium800/feather_bitmap_padded.jpg?1572385300)

This guide is intended to get you using the Adafruit 2.13" tri-color e-ink FeatherWing and 2.7" tri-color e-ink shield quickly with CircuitPython.

These displays come with headers already soldered on - male headers for the shield version and female headers for the Feather version. This allows them to be plugged in to their respective microcontrollers without soldering. Place on the microcontroller, upload your code and graphics file, and display!

## Refresh Times

Most LCD, OLED, and LED displays can be written to quite fast which helps to do moving graphics and colors easily.

For eInk displays, this is not the case. Erasing an image involves sending special signals to the display to "undo" the colored pixels from displaying. Adafruit recommends to not refresh these displays more often than every 180 seconds (3 minutes).

If they are written to more quickly, the display may be damaged. A damaged display may have pixels permanently on or off or other anomalies and voids the warranty. If you want to know more about time between refreshes, see the datasheet on the display you are using [here](https://learn.adafruit.com/adafruit-2-13-eink-display-breakouts-and-featherwings/downloads) and [here](https://learn.adafruit.com/adafruit-2-7-eink-display-breakouts-and-shields/downloads).

eInk displays continue to display an image, even with the power off. If you want a fairly static image, say a picture or a name badge, eInk is wonderful.

If you want a crisp, rarely changing display, eInk is great. For fast changing information, please consider a different class of display like TFT or OLED.

## Parts

### Feather Form Factor
### Adafruit Feather M4 Express - Featuring ATSAMD51

[Adafruit Feather M4 Express - Featuring ATSAMD51](https://www.adafruit.com/product/3857)
It's what you've been waiting for, the Feather M4 Express featuring ATSAMD51. This Feather is fast like a swift, smart like an owl, strong like a ox-bird (it's half ox, half bird, OK?) This feather is powered by our new favorite chip, the **ATSAMD51J19** -&nbsp; with...

In Stock
[Buy Now](https://www.adafruit.com/product/3857)
[Related Guides to the Product](https://learn.adafruit.com/products/3857/guides)
![Angled shot of a Adafruit Feather M4 Express. ](https://cdn-shop.adafruit.com/640x480/3857-10.jpg)

### Metro Form Factor
### Adafruit Metro M4 feat. Microchip ATSAMD51

[Adafruit Metro M4 feat. Microchip ATSAMD51](https://www.adafruit.com/product/3382)
Are you ready? Really ready? Cause here comes the fastest, most powerful Metro ever. The **Adafruit Metro M4** featuring the **Microchip ATSAMD51**. This Metro is like a bullet train, with its 120MHz Cortex M4 with floating point support. Your code will zig and zag...

In Stock
[Buy Now](https://www.adafruit.com/product/3382)
[Related Guides to the Product](https://learn.adafruit.com/products/3382/guides)
![Angled shot of a Adafruit Metro M4 feat. Microchip ATSAMD51. ](https://cdn-shop.adafruit.com/640x480/3382-13.jpg)

### Adafruit 2.7" Tri-Color eInk / ePaper Shield with SRAM

[Adafruit 2.7" Tri-Color eInk / ePaper Shield with SRAM](https://www.adafruit.com/product/4229)
Easy e-paper finally comes to microcontrollers, with this breakout that's designed to make it a breeze to add a tri-color eInk display. Chances are you've seen one of those new-fangled 'e-readers' like the Kindle or Nook. They have gigantic electronic paper 'static'...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4229)
[Related Guides to the Product](https://learn.adafruit.com/products/4229/guides)
![Top down view of a Adafruit 2.7" Tri-Color eInk / ePaper Shield with SRAM - Red Black White. ](https://cdn-shop.adafruit.com/640x480/4229-05.jpg)

## Programming

Any USB data plus power cable will work if it fits your computer at one end and has a micro B connector on the other end. The one below is a favorite, but pick your own depending on your needs.

# Quickstart using Adafruit eInk/ePaper displays with CircuitPython

## 2.13 Inch Tri-Color eInk FeatherWing

![](https://cdn-learn.adafruit.com/assets/assets/000/082/177/medium800/feather_4128-03.jpg?1570733012)

The eInk FeatherWIng is very easy to use. It has an SD card breakout on the back and female headers to plug into a Feather microcontroller. It's solderless if a Feather with male headers is used.

![](https://cdn-learn.adafruit.com/assets/assets/000/082/178/medium800/feather_4128-04.jpg?1570733265)

## Connection to a Feather Microcontroller

For a speedy chip with lots of memory, the examples use this display with an Adafruit Feather M4 Express microcontroller. Currently this board comes with unsoldered headers.

# Quickstart using Adafruit eInk/ePaper displays with CircuitPython

## 2.7" Tri-Color eInk Shield

![](https://cdn-learn.adafruit.com/assets/assets/000/082/554/medium800/feather_4229.png?1571429120)

This display, in an Arduino shield form factor, is very easy to use. It has an SD card breakout on the back and male headers to plug into a Metro size microcontroller. It is solderless if a Metro with standard female headers is used.

![](https://cdn-learn.adafruit.com/assets/assets/000/082/555/medium800/feather_4229-1.png?1571429297)

## Connection to a Metro Microcontroller

For a speedy chip with lots of memory, the examples use this display with an Adafruit Metro M4 Express microcontroller. The shield should plug into the Metro M4 with headers. If your Metro does not have female headers, please solder them in.

# Quickstart using Adafruit eInk/ePaper displays with CircuitPython

## CircuitPython and Library Setup

## Programming

All the quick start examples in this guide for CircuitPython use the new `displayio` driver in CircuitPython 5.0 and higher. The code provides powerful screen composition features and it is optimized. While there are examples of CircuitPython code using the older `adafruit_epd` methods, `displayio` is the future.

### Update CircuitPython on your Feather

You should check the version of CircuitPython running on your Feather. Plug the board into your computer with a known good data + power USB cable. The board should show up as a disk drive on your computer named **CIRCUITPY**.

Open up **boot\_out.txt**. This will show you the version of CircuitPython the board has loaded.

```none
Adafruit CircuitPython 5.0.0-alpha.4 on 2019-09-15; Adafruit Feather M4 Express with samd51j19
```

`displayio` requires CircuitPython 5 or above. If you have a board that is running a lower version of CircuitPython, you will need to update it. Upgrade to&nbsp;[latest version of Adafruit CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython)&nbsp;for your board.

## Required CircuitPython Libraries

To display a bitmap with `displayio`, there is only one required library, but it is dependent on the display you are using.

First, make sure you are running the&nbsp;[latest version of Adafruit CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython)&nbsp;for your board.

Next, you'll need to install the necessary library to use the hardware. Carefully follow the steps to find and install the library from [Adafruit's CircuitPython library bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle).&nbsp; Our introduction guide has&nbsp;[a great page on how to install the library bundle](https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries) for both Express and non-Express boards.

Due to the number of libraries in the bundle, it is recommended that you manually install the necessary libraries from the bundle. The first library depends on which eInk display you are using:

Feather and the 2.13" Tri Color eInk Display

- **adafruit\_IL0373**

Metro and the 2.7" Tri Color eInk Display

- **adafruit\_il91874**

Next, get the following library for displaying text on a `displayio` display. It is used for the second and third examples.

- **adafruit\_display\_text**

Before continuing, please make sure your board's **lib** folder has the correct driver file and the **adafruit\_display\_text** libraries copied over.

![](https://cdn-learn.adafruit.com/assets/assets/000/083/522/medium800/feather_Untitled.png?1572875652)

# Quickstart using Adafruit eInk/ePaper displays with CircuitPython

## Example: A Single Bitmap

![](https://cdn-learn.adafruit.com/assets/assets/000/083/237/medium800/feather_bitmap_padded_2.jpg?1572384468)

The first example reads a bitmap image placed on the board's **CIRCUITPY** drive and displays it on the eInk display.

## Image

The image used in this example is a CircuitPython text image which shows various elements. You can download it by clicking the green button below.

[display-ruler.bmp](https://cdn-learn.adafruit.com/assets/assets/000/083/117/original/display-ruler.bmp?1572274727)
For making your own graphic that can display decently on the three colors available on these displays, see the guide [Preparing Graphics for E-Ink Displays](https://learn.adafruit.com/preparing-graphics-for-e-ink-displays/overview).

If the picture is larger than the display width and height, the rest will truncate and not be displayed. It is suggested that you scale the image in an image editor prior to use as the code will not scale a bitmap.

Warning: 

## Code

The code below will take a bitmap placed on the board's flash drive (in the **CIRCUITPY** root directory) and display it on the eInk display. See the comments in the code for how each step contributes to the process.

![](https://cdn-learn.adafruit.com/assets/assets/000/083/525/medium800/feather_Untitled.png?1572876039)

Please select the code specific to your display and microcontroller as the two code blocks below are not interchangeable for both sets of hardware. The examples are nearly identical though.

![](https://cdn-learn.adafruit.com/assets/assets/000/083/233/medium800/feather_bitmap_213_padded.jpg?1572383990)

## 2.13" eInk FeatherWing Example

The pins reflect the combination of the FeatherWing eInk display and a Feather M4. It also has the pixel dimensions for the 2.13" display.

https://github.com/adafruit/Adafruit_CircuitPython_IL0373/blob/main/examples/il0373_2.13_color.py

![](https://cdn-learn.adafruit.com/assets/assets/000/083/235/medium800/feather_bitmap_27_padded_2.jpg?1572384254)

## 2.7" eInk Shield Example

The pins reflect the combination of the shield eInk display and a Metro M4. It also has the pixel dimensions of the 2.7" display.

https://github.com/adafruit/Adafruit_CircuitPython_IL91874/blob/main/examples/il91874_simpletest.py

## Code Review

For an overview of using `displayio` for displays with CircuitPython, the excellent guide [CircuitPython Display Support Using displayio](https://learn.adafruit.com/circuitpython-display-support-using-displayio/introduction) is your first stop. If you would like a deeper dive into the model used for displays, refer to this guide.

Adafruit suggests using the `displayio.release_displays` function before looking to execute additional code to ensure displays connected to the hardware are released by CircuitPython.

Next is to let the microcontroller&nbsp;know which pins are used on the display. The pins used are very display dependent, it is suggested the guide on the display be referred to for known a known, working configuration prior to looking to change things up. `displayio.FourWire` sets up the `displayio` connection to the display bus.

With the bus, the program establishes the connection to the display driver. The size of the display (`width` and `height`), the orientation (`rotation`), busy pin, and the highlight color are given. For this tri-color display, red (`0xff0000`) is specified.

The rest of the code follows the standard `displayio` display setup and use:

- Create a display group
- Open a bitmap to put on the display
- Create a bitmap object
- Create a TileGrid to put objects in with the bitmap and append the tile group to the display group
- Show the display on the screen
- Refresh the screen

Finally the program waits at least 3 minutes. Then the program will complete and go to the REPL. If the bitmap should stay on the screen, add `while True:` and `pass `statements at the end of the program.

# Quickstart using Adafruit eInk/ePaper displays with CircuitPython

## Example: Simple Text

![](https://cdn-learn.adafruit.com/assets/assets/000/083/262/medium800/feather_hw_both_2.jpg?1572395097)

This example displays text on the eInk display, the "Hello World" for eInk so to speak. Text can be placed anywhere and scaled larger.

## Code

The code below will use the internal `terminalio` font to display a single line of text on the eInk display. You can set the foreground and background color. See the comments for how each step contributes to the process.

Please select the code specific to your display and microcontroller as the two code blocks below are not interchangeable for both sets of hardware. The examples are nearly identical though.

![](https://cdn-learn.adafruit.com/assets/assets/000/083/265/medium800/feather_hw_213_2_padded.jpg?1572395585)

## 2.13" eInk FeatherWing Example

The pins reflect the combination of the FeatherWing eInk display and a Feather M4. It also has the pixel dimensions for the 2.13" display.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/EInk_CircuitPython_Quickstart/213_tricolor_eink_fw_text/code.py

![](https://cdn-learn.adafruit.com/assets/assets/000/083/229/medium800/feather_hw_27_padded.jpg?1572383463)

## 2.7" eInk Shield Example

The pins reflect the combination of the shield eInk display and a Metro M4. It also has the pixel dimensions of the 2.7" display.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/EInk_CircuitPython_Quickstart/27_tricolor_eink_shield_text/code.py

## Code Review

For an overview of using `displayio` for displays with CircuitPython, the excellent guide [CircuitPython Display Support Using displayio](https://learn.adafruit.com/circuitpython-display-support-using-displayio/introduction) is your first stop. If you would like a deeper dive into the model used for displays, refer to this guide.

Adafruit suggests using the `displayio.release_displays()` function before looking to execute additional code to ensure displays connected to the hardware are released by CircuitPython.

Next is to let `displayio` know which pins are used on the display. The specific pins used are very display dependent, it is suggested the guide on the display be referred to for known a known, working configuration prior to looking to change things up. `fourwire.FourWire` sets up the `displayio` connection to the display bus.

With the bus, the program establishes the connection to the display driver `adafruit_il0373`. The size of the display (`width` and `height`), the orientation (`rotation`), busy pin, and the highlight color are given. For this tri-color display, red (`0xff0000`) is specified.

The rest of the code follows the standard `displayio` display setup and use:

- Create a display group
- Set the desired background color as a bitmap
- Create a TileGrid to put objects in with the bitmap and append the tile group to the display group
- Add a display group item for text and use "Hello World!" as the sample text. Text is scaled by two in size and located at `x=40`, `y=40` to move it from the upper left down and to the right.
- Set your group as the `root_group` on the Display
- Refresh the screen

Finally the program waits 3 minutes (the minimum refresh time. Then the program uses `while True:` and `pass` statements to keep what's on the display until the processor is reset.

# Quickstart using Adafruit eInk/ePaper displays with CircuitPython

## Example: A Name Badge

![](https://cdn-learn.adafruit.com/assets/assets/000/083/245/medium800/feather_badge_2.jpg?1572385084)

The final example displays text over a bitmap on the eInk display, making a name badge useful for gatherings or conferences.

## Images

This example uses a square picture file in BMP format to display on the left side of the display. It could be someone's picture, a logo, or other art.

For using the 2.13" display with a height of 104 pixels, make your image 104x104.

For using the 2.7" display with a height of 176 pixels, make your image 176x176.

As the eInk display can only use 3 colors, see the companion guide [Preparing Graphics for E-Ink Displays](https://learn.adafruit.com/preparing-graphics-for-e-ink-displays/overview).&nbsp;You may have to play with images to see how they might display best on your chosen display.

Here are sample pictures used with the examples. For the 2.13" display, use the smaller picture and for the 2.7" shield, use the larger picture. Copy the image to the board's **CIRCUITPY** drive as **picture.bmp**.

![](https://cdn-learn.adafruit.com/assets/assets/000/083/198/medium800/feather_picture213.bmp?1572371873)

![](https://cdn-learn.adafruit.com/assets/assets/000/083/199/medium800/feather_picture27.bmp?1572371900)

![](https://cdn-learn.adafruit.com/assets/assets/000/083/526/medium800/feather_Untitled.png?1572876214)

## Code

The code below will display a square picture on the left and use the internal&nbsp;`terminalio`&nbsp;font to place two small lines of text on the right of the eInk display. You can set the foreground and background color. See the comments for how each step contributes to the process.

Please select the code specific to your display and microcontroller as the two code blocks below are not interchangeable for both sets of hardware. The examples are nearly identical though.

Info: 

![](https://cdn-learn.adafruit.com/assets/assets/000/083/243/medium800/feather_badge_213_padded.jpg?1572384801)

## 2.13" eInk FeatherWing Example

The pins reflect the combination of the FeatherWing eInk display and a Feather M4. It also has the pixel dimensions for the 2.13" display.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/EInk_CircuitPython_Quickstart/213_tricolor_eink_fw_badge/code.py

![](https://cdn-learn.adafruit.com/assets/assets/000/083/241/medium800/feather_badge_27_padded_2.jpg?1572384700)

## 2.7" eInk Shield Example

The pins reflect the combination of the shield eInk display and a Metro M4. It has the pixel dimensions of the 2.7" display.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/EInk_CircuitPython_Quickstart/27_tricolor_eink_shield_badge/code.py

## Code Review

For an overview of using `displayio` for displays with CircuitPython, the excellent guide [CircuitPython Display Support Using displayio](https://learn.adafruit.com/circuitpython-display-support-using-displayio/introduction) is your first stop. If you would like a deeper dive into the model used for displays, refer to this guide.

Adafruit suggests using the `displayio.release_displays()` function before looking to execute additional code to ensure displays connected to the hardware are released by CircuitPython.

Next is to let `displayio` know which pins are used on the display. The specific pins used are very display dependent, it is suggested the guide on the display be referred to for known a known, working configuration prior to looking to change things up. `fourwire.FourWire` sets up the `displayio` connection to the display bus.

The display dimensions (display-specific) are defined. Then the bus, the program establishes the connection to the display driver. The size of the display (`width` and `height`), the orientation (`rotation`), busy pin, and the highlight color are given. For this tri-color display, red (`0xff0000`) is specified.

The rest of the code is very similar to the last two examples. First a bitmap graphic named **picture.bmp** is read from the root directory of the **CIRCUITPY** drive. The graphic is set in the display group with `displayio.TileGrid`. Then two lines of text are defined. They are placed a few pixels to the right of the bitmap and equidistant to the middle of the display's height.

Not much text can fit in this manor. There are two methods you can get more text width:

- Changing `scale=2` to `scale=1` will give more characters per line but the text will be smaller.
- If you need ultimate flexibility, it is suggested you create all your design elements into one bitmap picture and use the first example to display just the bitmap.

The program places all the group elements on screen by setting `display.root_group` then refreshes the display with `display.refresh` to actually have the graphics show up. It takes 2-3 seconds for an eInk display to erase the previous image and display the new image.

Finally the program waits 3 minutes. A `while True:` and `pass `loop is at the end of the program so the REPL does not erase the badge graphics. Pressing the reset button will start the program again.

# Quickstart using Adafruit eInk/ePaper displays with CircuitPython

## Going Further

This guide is meant as an introduction to using bitmap graphics and text on a three color eInk display with CircuitPython and the `displayio` library.

Additional Adafruit Learning System Guides provide more examples of making different screen elements. Please refer to the following guides for more information:

- [Adafruit eInk Display Breakouts](https://learn.adafruit.com/adafruit-eink-display-breakouts/overview)

- [Preparing Graphics for E-Ink Displays](https://learn.adafruit.com/preparing-graphics-for-e-ink-displays/overview)

- [CircuitPython Display Support Using displayio](https://learn.adafruit.com/circuitpython-display-support-using-displayio/introduction)

For more advanced name tag badges, you might consider using and Adafruit PyBadge with its TFT LCD display

- [PyBadge Conference Badge With Unicode Fonts](https://learn.adafruit.com/pybadge-conference-badge-multi-language-unicode-fonts/overview)


## Featured Products

### Adafruit 2.13" Tri-Color eInk / ePaper Display FeatherWing

[Adafruit 2.13" Tri-Color eInk / ePaper Display FeatherWing](https://www.adafruit.com/product/4128)
Easy e-paper finally comes to your Feather, with this breakout that's designed to make it a breeze to add a tri-color eInk display. Chances are you've seen one of those new-fangled 'e-readers' like the Kindle or Nook. They have gigantic electronic paper 'static'...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/4128)
[Related Guides to the Product](https://learn.adafruit.com/products/4128/guides)
### Adafruit Feather M4 Express - Featuring ATSAMD51

[Adafruit Feather M4 Express - Featuring ATSAMD51](https://www.adafruit.com/product/3857)
It's what you've been waiting for, the Feather M4 Express featuring ATSAMD51. This Feather is fast like a swift, smart like an owl, strong like a ox-bird (it's half ox, half bird, OK?) This feather is powered by our new favorite chip, the **ATSAMD51J19** -&nbsp; with...

In Stock
[Buy Now](https://www.adafruit.com/product/3857)
[Related Guides to the Product](https://learn.adafruit.com/products/3857/guides)
### Adafruit 2.7" Tri-Color eInk / ePaper Shield with SRAM

[Adafruit 2.7" Tri-Color eInk / ePaper Shield with SRAM](https://www.adafruit.com/product/4229)
Easy e-paper finally comes to microcontrollers, with this breakout that's designed to make it a breeze to add a tri-color eInk display. Chances are you've seen one of those new-fangled 'e-readers' like the Kindle or Nook. They have gigantic electronic paper 'static'...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4229)
[Related Guides to the Product](https://learn.adafruit.com/products/4229/guides)
### Adafruit Metro M4 feat. Microchip ATSAMD51

[Adafruit Metro M4 feat. Microchip ATSAMD51](https://www.adafruit.com/product/3382)
Are you ready? Really ready? Cause here comes the fastest, most powerful Metro ever. The **Adafruit Metro M4** featuring the **Microchip ATSAMD51**. This Metro is like a bullet train, with its 120MHz Cortex M4 with floating point support. Your code will zig and zag...

In Stock
[Buy Now](https://www.adafruit.com/product/3382)
[Related Guides to the Product](https://learn.adafruit.com/products/3382/guides)
### Pink and Purple Braided USB A to Micro B Cable - 2 meter long

[Pink and Purple Braided USB A to Micro B Cable - 2 meter long](https://www.adafruit.com/product/4148)
This cable is&nbsp;super-fashionable&nbsp;with a woven pink and purple Blinka-like pattern!

First let's talk about the cover and over-molding. We got these in custom colors, and if you&nbsp;_have_&nbsp;to have visible cables, then you might as well have the nicest fabric-bound...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/4148)
[Related Guides to the Product](https://learn.adafruit.com/products/4148/guides)

## Related Guides

- [Adafruit Metro M4 Express featuring ATSAMD51](https://learn.adafruit.com/adafruit-metro-m4-express-featuring-atsamd51.md)
- [Adafruit Feather M4 Express](https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51.md)
- [Adafruit 2.7" eInk Display Breakouts and Shields](https://learn.adafruit.com/adafruit-2-7-eink-display-breakouts-and-shields.md)
- [NeoTrellis Sound Board](https://learn.adafruit.com/neotrellis-soundboard.md)
- [Animatronic Cosplay Wings](https://learn.adafruit.com/animatronic-cosplay-wings.md)
- [Making oscilloscope images with DACs](https://learn.adafruit.com/dac-oscilloscope-images.md)
- [Ethernet for CircuitPython with Wiznet5K](https://learn.adafruit.com/ethernet-for-circuitpython.md)
- [RGB LED Matrices with CircuitPython](https://learn.adafruit.com/rgb-led-matrices-matrix-panels-with-circuitpython.md)
- [DIY Robotic Sky Tracking Astrophotography Mount with CircuitPython](https://learn.adafruit.com/diy-robotic-sky-tracking-astrophotography-mount.md)
- [CircuitPython OLED Watch Clock](https://learn.adafruit.com/circuitpython-oled-watch.md)
- [Holiday Icicle Lights with Flair](https://learn.adafruit.com/holiday-icicle-lights-with-flair.md)
- [Currying in CircuitPython](https://learn.adafruit.com/partials-in-circuitpython.md)
- [Zelda Master Sword](https://learn.adafruit.com/zelda-master-sword.md)
- [3D Printed LED Microphone Flag](https://learn.adafruit.com/3d-printed-led-microphone-flag.md)
- [Textable Sensor with FONA and CircuitPython](https://learn.adafruit.com/textable-sensor-with-fona-and-circuitpython.md)
- [Esenciales para CircuitPython](https://learn.adafruit.com/esenciales-para-circuitpython.md)
- [CircuitPython Motorized Camera Slider](https://learn.adafruit.com/circuitpython-motorized-camera-slider.md)
- [CircuitScheme - Lisp on CircuitPython](https://learn.adafruit.com/scheme-in-circuitpython.md)
