# Adafruit EYESPI BFF

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/122/075/medium800/adafruit_products_5772-04.jpg?1687785645)

Our QT Py boards are a great way to make very small microcontroller projects that pack a ton of power - and now we have a way for you to add a small, colorful, and bright display to any project.

![](https://cdn-learn.adafruit.com/assets/assets/000/122/076/medium800/adafruit_products_5772-03.jpg?1687785797)

Our most recent [display breakouts have come with a new feature: an 18-pin "EYE SPI" standard FPC connector with flip-top connector](https://www.adafruit.com/?q=eyespi&sort=BestMatch). This is intended to be a sort-of "[STEMMA QT](https://learn.adafruit.com/introducing-adafruit-stemma-qt) for displays" - a way to quickly connect and extend display wiring that uses a lot of SPI pins. In this case, we need a lot of SPI pins, and we want to be able to use long distances, so we go with an 18-pin 0.5mm pitch FPC.

With such a slim and flexible cable, it's a perfect matching for [our QT Py boards](https://www.adafruit.com/search?q=qt+py) to make extra smol microcontroller boards with [big bold colorful displays](https://www.adafruit.com/search?q=eyespi+display) or [power-sipping E-Ink](https://www.adafruit.com/search?q=e-ink).

![](https://cdn-learn.adafruit.com/assets/assets/000/122/077/medium800/adafruit_products_5772-02.jpg?1687785959)

Don't forget you'll also want an [18-pin EYESPI FPC cable](https://www.adafruit.com/product/5462). And of course [one of our EYESPI displays](https://www.adafruit.com/search?q=eyespi) too - look for the EYESPI logo on the back to know you've got one that can clip in.

- **MOSI/MISO/SCK** SPI pins are connected to the default **SPI** port on the QT Py
- **SDA/SCL** I2C pins are connected to the **I2C** port on the QT Py headers - some boards have a separate QT Py I2C port so keep in mind they may be separate busses.
- **TFT CS** on **TX** pin - but can be re-configured/disabled by cutting a solder jumper.
- **TFT DC** on **RX** pin - but can be re-configured/disabled by cutting a solder jumper.

We also have 'sometimes used' pins that can be re-configured/disabled by cutting a solder jumper

- **IRQ** on **A0** pin - Many of our displays don't use the IRQ pin unless there's a touchscreen.
- **Touch CS** on **A1** pin - Many of our displays don't have a touchscreen.
- **Memory CS** on **A2** pin - Only our E-Ink displays have a separate memory SRAM chip, which you may be able to skip using on most QT Py's.
- **SD Card CS** on **A3** pin - Or use for whatever you like if you aren't using the SD Card socket on of our display breakouts.

There's also two through-hole solder pads for extra pins that are often considered optional and we didn't have any more IO to spare. If you aren't using any of the 4 pins above or the I2C port, you could wire these two pins with jumper wires as you desire.

- **Backlight control** - this is default on for most of our displays, or unused on E-Ink.
- **Display reset** - this is default on for most of our displays. Sometimes its used for low-power on E-Ink.

![](https://cdn-learn.adafruit.com/assets/assets/000/122/078/medium800/adafruit_products_5772-01.jpg?1687786076)

We include some header that you can solder to your QT Py. [You can also pick up an Itsy Bitsy short female header kit to make it removable but compact](https://www.adafruit.com/product/4174), you'll just need to trim down the headers to 7 pins long.

- Comes as an assembled and tested PCB
- For any QT Py or Xiao boards

**QT Py, display and EYESPI cable are not included**.

# Adafruit EYESPI BFF

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/122/079/medium800/adafruit_products_front_back.jpg?1687786338)

## Default EYESPI Pins

- **MO** - This is the SPI MOSI ( **M** icrocontroller&nbsp; **O** ut /&nbsp; **S** erial&nbsp; **I** n) pin. It is used to send data from the microcontroller to the SD card and/or display. It is connected to the default **MOSI** pin on the QT Py.
- **MI** -&nbsp;This is the SPI MISO ( **M** icrocontroller&nbsp; **I** n /&nbsp; **S** erial&nbsp; **O** ut) pin. It's used for the SD card. It isn't used for the display because it's write-only. It is connected to the default **MISO** pin on the QT Py.
- **SCK** - This is the SPI clock input pin. It is connected to the default **SCK** pin on the QT Py.
- **TFT CS** - located on the&nbsp; **TX** &nbsp;pin. This is the TFT or eInk SPI chip select pin.
- **TFT DC** - located on the&nbsp; **RX** &nbsp;pin. This is the display SPI data/command selector pin.

The following pins are optional depending on the display you are using:

- **IRQ** - the Interrupt pin, located on the&nbsp; **A0** pin. Many of our displays don't use the IRQ pin unless there's a touchscreen. When a touch is detected, this pin goes low.&nbsp;
- **Touch CS** - located on the&nbsp; **A1** pin. Many of our displays don't have a touchscreen.
- **Memory CS** - located on the&nbsp; **A2** pin. Only our E-Ink displays have a separate memory SRAM chip, which you may be able to skip using on most QT Py's.
- **SD Card CS** - located on the&nbsp; **A3** &nbsp;pin. This pin is required for communicating with the onboard display SD card holder.

## I2C Logic Pins

The I2C pins are connected to the&nbsp; **I2C** &nbsp;port on the QT Py headers - some boards have a separate QT Py I2C port so keep in mind they may be separate busses.

- **SCL** &nbsp;- This is the I2C serial clock pin.&nbsp;
- **SDA** &nbsp;- This is the I2C serial data pin.&nbsp;

## Extra EYESPI Pins

- **LIT/LITE** &nbsp;- the Backlight Control pin. By default, this pin is not connected to any of the QT Py pins. It is default on for most of our displays and is unused on E-Ink.
- **RST/RESET** &nbsp;- the Display Reset pin. By default, this pin is not connected to any of the QT Py pins. It is default on for most of our displays. Sometimes its used for low-power on E-Ink.

## Through-Hole Solder Pads and Jumpers

There are jumpers and through-hole solder pads for some of the EYESPI pins to enable you to change the default QT Py pins.

**First, cut the trace on the jumper associated with the default pin. Next, solder a wire between the solder pad and the desired QT Py pin.**

- **TCS** / **TS CS** - the Touch CS pin (cutting the jumper disconnects it from pin A1)
- **MCS** / **MEMCS** - the Memory CS pin (cutting the jumper disconnects it from pin A2)
- **SCS** / **SD CS** - the SD Card CS pin (cutting the jumper disconnects it from pin A3)
- **INT** - the IRQ/Interrupt pin (cutting the jumper disconnects it from pin A0)
- **DC** - the TFT DC pin (cutting the jumper disconnects it from pin RX)
- **CS** - the TFT CS pin (cutting the jumper disconnects it from pin TX)

# Adafruit EYESPI BFF

## CircuitPython

Using the EYESPI BFF with CircuitPython involves wiring up the BFF to your QT Py or Xiao form factor board and plugging in your EYESPI-compatible display via an EYESPI cable. Then, you load the code and necessary libraries onto your QT Py to see the graphics test on the display.

This page uses the 1.54" 240x240 ST7789 TFT display for demonstrating CircuitPython usage. You can use the same concepts to get going with any EYESPI-compatible display.

### Adafruit 1.54" 240x240 Wide Angle TFT LCD Display with MicroSD

[Adafruit 1.54" 240x240 Wide Angle TFT LCD Display with MicroSD](https://www.adafruit.com/product/3787)
We've been looking for a display like this for a long time - it's only 1.5" diagonal but has a high density 220 ppi, 240x240 pixel display with full-angle viewing. It _looks_ a lot like our 1.44" 128x128 display, but has 4x as many pixels and looks great at any angle....

In Stock
[Buy Now](https://www.adafruit.com/product/3787)
[Related Guides to the Product](https://learn.adafruit.com/products/3787/guides)
![Top Down Demo Video of OLED breakout wired up on breadboard to QT Py and BFF driver board. Video displays multi-colored shapes and animations.](https://cdn-shop.adafruit.com/product-videos/640x480/3787-16.jpg)

### EYESPI Cable - 18 Pin 100mm long Flex PCB (FPC) A-B type

[EYESPI Cable - 18 Pin 100mm long Flex PCB (FPC) A-B type](https://www.adafruit.com/product/5239)
Connect this to that when a 18-pin FPC connector is needed. This 25 cm long cable is made of a flexible PCB. It's A-B style which means that pin one on one side will match with pin one on the other side. How handy!

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/5239)
[Related Guides to the Product](https://learn.adafruit.com/products/5239/guides)
![Angled shot of a EYESPI Cable - 18 Pin 100mm long Flex PCB (FPC) A-B type. ](https://cdn-shop.adafruit.com/640x480/5239-00.jpg)

## CircuitPython Microcontroller Wiring

Plug an EYESPI BFF into your QT Py or Xiao form factor board exactly as shown below. Here's an example of connecting a QT Py RP2040 to the BFF.

Connect the QT Py RP2040 with plug headers into the EYESPI BFF with socket headers. They should be plugged in with the backs of the boards facing each other.

For more information on soldering socket headers,&nbsp;[check out this Learn Guide](https://learn.adafruit.com/how-to-solder-headers/female-headers).

![adafruit_products_edited_P1410024.jpg](https://cdn-learn.adafruit.com/assets/assets/000/122/094/medium640/adafruit_products_edited_P1410024.jpg?1687811152)

[How to Solder Headers Learn Guide](https://learn.adafruit.com/how-to-solder-headers/female-headers)
Then, connect the 1.54" display to the EYESPI BFF with an EYESPI cable. The blue stripe on the EYESPI cable should be facing up towards you in both of the EYESPI connectors.

![adafruit_products_edited_P1410032.jpg](https://cdn-learn.adafruit.com/assets/assets/000/122/096/medium640/adafruit_products_edited_P1410032.jpg?1687811859)

## CircuitPython Usage

To use with CircuitPython, you need to first install the necessary libraries, and their dependencies, into the&nbsp; **lib** &nbsp;folder on your&nbsp; **CIRCUITPY** &nbsp;drive. Then you need to update&nbsp; **code.py** &nbsp;with the example script.

Thankfully, we can do this in one go. In the example below, click the&nbsp; **Download Project Bundle** &nbsp;button below to download the necessary libraries and the&nbsp; **code.py** &nbsp;file in a zip file. Extract the contents of the zip file.

Connect the microcontroller to your computer via a known-good USB power+data cable. The board shows up as a thumb drive named&nbsp; **CIRCUITPY**. Copy the&nbsp; **entire lib folder** , the&nbsp; **Helvetica-Bold-16.pcf** &nbsp;font file, the **blinka\_computer.bmp** image file and the&nbsp; **code.py** &nbsp;file to your&nbsp; **CIRCUITPY** &nbsp;drive.

Your&nbsp; **CIRCUITPY/lib** &nbsp;folder should contain the following folders and files:

- **/adafruit\_bitmap\_font**
- **/adafruit\_display\_shapes**
- **/adafruit\_display\_text**
- **adafruit\_st7789.mpy**
- **simpleio.mpy**

Once you have copied over the necessary folders and files, your&nbsp; **CIRCUITPY&nbsp;** drive should resemble the following:

![CIRCUITPY](https://adafruit.github.io/Adafruit_Learning_System_Guides/EYESPI_BFF_CircuitPython_EYESPI_BFF.png )

## Example Code
https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/EYESPI_BFF/CircuitPython_EYESPI_BFF/code.py

This example is a port of the&nbsp;[Arduino&nbsp; **16bit\_hello** &nbsp;code written by Phil B](https://github.com/adafruit/PicoDVI/blob/master/examples/16bit_hello/16bit_hello.ino). with some slight variation to show off some of the unique abilities of&nbsp; **displayio**.

The example begins by showing a rectangle, circle, triangle and rounded rectangle and changing the fill attribute from&nbsp;`None`&nbsp;to a color.

Then, a few chart variations are shown, including a sine wave pattern, line graph and bar graph.

Next is a text alignment example, showing how to use the&nbsp;`anchor_point`&nbsp;and&nbsp;`anchor_position`&nbsp;functions in the&nbsp; **adafruit\_display\_text** &nbsp;library.

Following that is a custom text example, loading a bitmap font instead of the built-in&nbsp; **terminalio** &nbsp;font.

Then there is a quick break from fonts to show off a bitmap image, specifically Blinka happily using her computer.

Finally, an example shows how to update the text in a&nbsp;`Label`&nbsp;object for projects where you want to display text information that updates over time.

![](https://cdn-learn.adafruit.com/assets/assets/000/122/100/medium800thumb/adafruit_products_cp_eyespibff.jpg?1687822111)

It's important to note that the example code is optimized to be able to run all of the examples in a loop, which you more than likely won't want to do for your projects. As a result, the `clean_up(group)` function is run after each example to use `pop()` to remove all of the graphical elements of the **displayio** `group`. [Garbage collection](https://learn.adafruit.com/Memory-saving-tips-for-CircuitPython?view=all#overview) (`gc.collect()`) is also run to conserve memory. Additionally, each graphical element is created and deleted each time in each of the functions.

If you were to run, for example, the `sensor_values()` function on its own for a project, you would instantiate the graphical elements _once_, before the loop, and then update the text with the "values" in the loop:

```python
...

text_x = "X: %d" % randint(-25, 25)
text_y = "Y: %d" % randint(-25, 25)
text_z = "Z: %d" % randint(-25, 25)
x_text = label.Label(terminalio.FONT, text=text_x, color=red)
x_text.anchor_point = (0.0, 0.0)
x_text.anchored_position = (2, 0)
y_text = label.Label(terminalio.FONT, text=text_y, color=green)
y_text.anchor_point = (0.0, 0.0)
y_text.anchored_position = (2, 10)
z_text = label.Label(terminalio.FONT, text=text_z, color=blue)
z_text.anchor_point = (0.0, 0.0)
z_text.anchored_position = (2, 20)
group.append(x_text)
group.append(y_text)
group.append(z_text)

while True:
    for i in range(40):
        if i == 10:
            group.scale = 2
        elif i == 20:
            group.scale = 3
        elif i == 30:
            group.scale = 4
        x_text.text = "X: %d" % randint(-50, 50)
        y_text.text = "Y: %d" % randint(-50, 50)
        z_text.text = "Z: %d" % randint(-50, 50)
        time.sleep(0.1)
```

# Adafruit EYESPI BFF

## CircuitPython Docs

# Adafruit EYESPI BFF

## Arduino

Using the EYESPI BFF with Arduino involves wiring up the breakout to your Arduino-compatible QT Py or Xiao form factor board, plugging in your EYESPI compatible screen via the EYESPI cable, installing the library for your display type and running the provided example code.

Below is example wiring and code for a ST7789 TFT display using the [Adafruit\_ST7789](https://github.com/adafruit/Adafruit-ST7735-Library) library.

### Adafruit 1.54" 240x240 Wide Angle TFT LCD Display with MicroSD

[Adafruit 1.54" 240x240 Wide Angle TFT LCD Display with MicroSD](https://www.adafruit.com/product/3787)
We've been looking for a display like this for a long time - it's only 1.5" diagonal but has a high density 220 ppi, 240x240 pixel display with full-angle viewing. It _looks_ a lot like our 1.44" 128x128 display, but has 4x as many pixels and looks great at any angle....

In Stock
[Buy Now](https://www.adafruit.com/product/3787)
[Related Guides to the Product](https://learn.adafruit.com/products/3787/guides)
![Top Down Demo Video of OLED breakout wired up on breadboard to QT Py and BFF driver board. Video displays multi-colored shapes and animations.](https://cdn-shop.adafruit.com/product-videos/640x480/3787-16.jpg)

### EYESPI Cable - 18 Pin 100mm long Flex PCB (FPC) A-B type

[EYESPI Cable - 18 Pin 100mm long Flex PCB (FPC) A-B type](https://www.adafruit.com/product/5239)
Connect this to that when a 18-pin FPC connector is needed. This 25 cm long cable is made of a flexible PCB. It's A-B style which means that pin one on one side will match with pin one on the other side. How handy!

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/5239)
[Related Guides to the Product](https://learn.adafruit.com/products/5239/guides)
![Angled shot of a EYESPI Cable - 18 Pin 100mm long Flex PCB (FPC) A-B type. ](https://cdn-shop.adafruit.com/640x480/5239-00.jpg)

## Wiring

Plug an EYESPI BFF into your QT Py or Xiao form factor board exactly as shown below. Here's an example of connecting a QT Py RP2040 to the BFF.

Connect the QT Py RP2040 with plug headers into the EYESPI BFF with socket headers. They should be plugged in with the backs of the boards facing each other.

For more information on soldering socket headers,&nbsp;[check out this Learn Guide](https://learn.adafruit.com/how-to-solder-headers/female-headers).

![adafruit_products_edited_P1410024.jpg](https://cdn-learn.adafruit.com/assets/assets/000/122/141/medium640/adafruit_products_edited_P1410024.jpg?1687824355)

[How to Solder Headers Learn Guide](https://learn.adafruit.com/how-to-solder-headers/female-headers)
Then, connect the 1.54" display to the EYESPI BFF with an EYESPI cable. The blue stripe on the EYESPI cable should be facing up towards you in both of the EYESPI connectors.

![adafruit_products_edited_P1410032.jpg](https://cdn-learn.adafruit.com/assets/assets/000/122/142/medium640/adafruit_products_edited_P1410032.jpg?1687825636)

## Library Installation

You can install the&nbsp; **Adafruit ST7789&nbsp;** library&nbsp;for Arduino using the Library Manager in the Arduino IDE.

![](https://cdn-learn.adafruit.com/assets/assets/000/122/082/medium800/adafruit_products_Arduino_Open_Library_Manager.png?1687793883)

Click the&nbsp; **Manage Libraries ...** &nbsp;menu item, search for&nbsp; **Adafruit ST7789** ,&nbsp;and select the&nbsp; **Adafruit ST7735 and ST7789 Library** &nbsp;library:

![](https://cdn-learn.adafruit.com/assets/assets/000/122/083/medium800/adafruit_products_st7789lib.png?1687794411)

If asked about dependencies, click "Install all".

![](https://cdn-learn.adafruit.com/assets/assets/000/122/084/medium800/adafruit_products_st7789depends.png?1687794442)

If the "Dependencies" window does not come up, then you already have the dependencies installed.&nbsp;

Warning: 

## Example Code
https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/EYESPI_BFF/Arduino_EYESPI_BFF/Arduino_EYESPI_BFF_Example/Arduino_EYESPI_BFF_Example.ino

Upload the sketch to your board. You should see the graphics test begin running on your display. The tests include drawing shapes, graphs and text. After every loop of the test, the code will rotate the screen orientation by 90 degrees and run the test again. The code is heavily commented so you can utilize the examples for various graphic techniques in your projects.

![](https://cdn-learn.adafruit.com/assets/assets/000/122/140/medium800thumb/adafruit_products_arduino_eyespibff.jpg?1687824580)

# Adafruit EYESPI BFF

## Arduino Docs

# Adafruit EYESPI BFF

## Downloads

## Files

- [EagleCAD PCB files on GitHub](https://github.com/adafruit/Adafruit-EYESPI-BFF-PCB)
- [Fritzing object in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20EYESPI%20BFF.fzpz)
- [Fritzing object with EYESPI cable in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20EYESPI%20BFF%20with%20EYESPI%20cable.fzpz)

## Schematic and Fab Print
![](https://cdn-learn.adafruit.com/assets/assets/000/122/080/medium800/adafruit_products_schem.png?1687788341)

![](https://cdn-learn.adafruit.com/assets/assets/000/122/081/medium800/adafruit_products_fab.png?1687788347 dimensions are in inches)


## Primary Products

### Adafruit EYESPI BFF for QT Py or Xiao - 18 Pin FPC Connector

[Adafruit EYESPI BFF for QT Py or Xiao - 18 Pin FPC Connector](https://www.adafruit.com/product/5772)
Our QT Py boards are a great way to make very small microcontroller projects that pack a ton of power - and now we have a way for you to add a small, colorful, and bright display to any project.

Our most recent [display...](https://www.adafruit.com/?q=eyespi&sort=BestMatch)

In Stock
[Buy Now](https://www.adafruit.com/product/5772)
[Related Guides to the Product](https://learn.adafruit.com/products/5772/guides)

## Featured Products

### EYESPI Cable - 18-pin 50mm long Flex PCB (FPC) A-B Type

[EYESPI Cable - 18-pin 50mm long Flex PCB (FPC) A-B Type](https://www.adafruit.com/product/5462)
Connect this to that when an 18-pin FPC connector is needed. This 50mm long cable is made of a flexible PCB. It's A-B style which means that pin one on one side will match with pin one on the other side. How handy!

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/5462)
[Related Guides to the Product](https://learn.adafruit.com/products/5462/guides)
### EYESPI Cable - 18 Pin 100mm long Flex PCB (FPC) A-B type

[EYESPI Cable - 18 Pin 100mm long Flex PCB (FPC) A-B type](https://www.adafruit.com/product/5239)
Connect this to that when a 18-pin FPC connector is needed. This 25 cm long cable is made of a flexible PCB. It's A-B style which means that pin one on one side will match with pin one on the other side. How handy!

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/5239)
[Related Guides to the Product](https://learn.adafruit.com/products/5239/guides)
### EYESPI Cable - 18 Pin 200mm long Flex PCB (FPC) A-B type

[EYESPI Cable - 18 Pin 200mm long Flex PCB (FPC) A-B type](https://www.adafruit.com/product/5240)
Connect this to that when a 18-pin FPC connector is needed. This 20 cm long cable is made of a flexible PCB. It's A-B style which means that pin one on one side will match with pin one on the other side. How handy!

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/5240)
[Related Guides to the Product](https://learn.adafruit.com/products/5240/guides)

## Related Guides

- [Asteroid Tracker](https://learn.adafruit.com/asteroid-tracker.md)
- [Cartoon Character Clock](https://learn.adafruit.com/cartoon-character-clock.md)
- [World Clock](https://learn.adafruit.com/world-clock.md)
- [QT Py S2 Round Display Compass](https://learn.adafruit.com/qt-py-s2-round-display-compass.md)
- [QT Py CH32V203 eInk / ePaper Daily Calendar and Clock](https://learn.adafruit.com/ch32v203-eink-epaper-calendar-and-clock.md)
- [Adafruit MagTag COVID Vaccination Percent Tracker](https://learn.adafruit.com/adafruit-magtag-covid-vaccination-percent-tracker.md)
- [Adafruit ATWINC1500 WiFi Breakout](https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout.md)
- [Adafruit OPT4048 XYZ Color Sensor](https://learn.adafruit.com/adafruit-opt4048-xyz-color-sensor.md)
- [USB Rotary Media Dial](https://learn.adafruit.com/usb-rotary-media-dial.md)
- [Watchmen's Sister Night NeoPixel Goggles](https://learn.adafruit.com/watchmen-sister-night-circuitpython-neopixel-goggles.md)
- [Adafruit CH9328 UART to HID Keyboard Breakout](https://learn.adafruit.com/adafruit-ch9328-uart-to-hid-keyboard-breakout.md)
- [CircuitPython BLE Heart Rate Zone Trainer Display](https://learn.adafruit.com/circuitpython-ble-heart-rate-monitor-gizmo.md)
- [Commodore Keyboard to USB HID with CircuitPython](https://learn.adafruit.com/commodore-keyboard-to-usb-hid-with-circuitpython.md)
- [Adafruit Neo Trinkey](https://learn.adafruit.com/adafruit-neo-trinkey.md)
- [FunHouse IoT Fume Extractor and Air Quality Sensor](https://learn.adafruit.com/funhouse-fume-extractor-iot-air-quality-sensor.md)
