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.

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 latest version of Adafruit CircuitPython 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 latest version of Adafruit CircuitPython 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.  Our introduction guide has a great page on how to install the library bundle 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.

This guide was first published on Nov 13, 2019. It was last updated on Nov 13, 2019.

This page (CircuitPython and Library Setup) was last updated on Jun 08, 2021.

Text editor powered by tinymce.