# Adafruit EYESPI Pi Beret

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/124/109/medium800/adafruit_products_EPB_assembled.jpg?1693253016)

Raspberry Pi's make for handy li'l computers, but they're really wonderful when you can connect all sorts of nifty hardware to them: color TFT or E-Ink displays, and sensors are our go-to favorites. Even better is when we make it fast and effortless to wire these up.

With this new EYESPI Pi Beret, there's no more counting pins or noodling with a breakout board. [This slim HAT](https://www.raspberrypi.com/news/introducing-raspberry-pi-hats/) plugs in and gives you lots of hardware connection options so that many projects become plug-and-play.

![](https://cdn-learn.adafruit.com/assets/assets/000/124/110/medium800/adafruit_products_EPB_top.jpg?1693253024)

Our most recent&nbsp;[display breakouts have come with a new feature:&nbsp;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 and accessory 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 easy to have displays anywhere [without them physically attached to the Pi like in our PiTFTs](https://www.adafruit.com/category/804). Accessorize with&nbsp;[big bold colorful displays](https://www.adafruit.com/search?q=eyespi+display)&nbsp;or&nbsp;[power-sipping E-Ink](https://www.adafruit.com/search?q=e-ink).&nbsp;

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

![](https://cdn-learn.adafruit.com/assets/assets/000/124/111/medium800/adafruit_products_EPB_bottom.jpg?1693253037)

### Pins:

- **MOSI/MISO/SCK** &nbsp;SPI pins are connected to the default **&nbsp;SPI&nbsp;** port on the Raspberry Pi.
- **SDA/SCL** &nbsp;I2C pins are connected to the default&nbsp; **I2C** port on the Pi.
- **Display CS&nbsp;** on Raspberry Pi&nbsp; **CE 0.**
- **Display DC&nbsp;** on&nbsp;Raspberry Pi **GPIO #25.**
- **Display Reset&nbsp;** on&nbsp;Raspberry Pi **GPIO #27.**
- **Display Busy&nbsp;** on&nbsp;Raspberry Pi **GPIO #17&nbsp;** (used for E-Inks).
- **Display Backlight&nbsp;** on&nbsp;Raspberry Pi **GPIO #18&nbsp;** (there's a jumper to cut/disable this if you want to use the PWM output for other uses like NeoPixels).
- **Touch CS&nbsp;** on Raspberry Pi&nbsp; **CE 1.**
- **Touch IRQ&nbsp;** on&nbsp;Raspberry Pi **GPIO #24.**

![](https://cdn-learn.adafruit.com/assets/assets/000/124/112/medium800/adafruit_products_EPB_edge.jpg?1693253056)

The remaining EYESPI pins are not connected, leaving you with plenty of GPIO for other accessory boards.

We also have a Stemma QT connector for the I2C port, to make connecting all sorts of Qwiic/Stemma QT devices super easy,&nbsp;two tactile switches on GPIO #5 and #6 and a slide switch on GPIO #13 which you can use for any sort of interface project or configuration.

**Display and EYESPI cable are not included**.

# Adafruit EYESPI Pi Beret

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/124/116/medium800/adafruit_products_EPB_top.jpg?1693261556)

## EYESPI Display Connector

- **EYESPI connector** - This connector allows you to connect EYESPI-compatible displays up using an EYESPI cable, with no soldering or jumper wires needed.

### Pins needed for using the display:

- **MOSI/MISO/SCK** - SPI pins are connected to the default **&nbsp;SPI&nbsp;** port on the Raspberry Pi.
- **Display CS&nbsp;** on Raspberry Pi&nbsp; **CE 0.**
- **Display DC&nbsp;** on&nbsp;Raspberry Pi **GPIO #25.**
- **Display Reset&nbsp;** on&nbsp;Raspberry Pi **GPIO #27.**
- **Display Busy&nbsp;** on&nbsp;Raspberry Pi **GPIO #17** (This pin is used by E-Ink displays).
- **Display Backlight&nbsp;** on&nbsp;Raspberry Pi **GPIO**  **#18** (There's a jumper to disable this; see below).
- **Display Touch CS** on Raspberry Pi&nbsp; **CE 1** (This pin is not used by all displays).
- **Display Touch IRQ** on&nbsp;Raspberry Pi **GPIO #24** (This pin is not used by all displays).

### Backlight Jumper

- **BL jumper** - There is a jumper located next to the EYESPI label on the board silk. If you cut this trace, you will disable the backlight. Do this if you want to use the PWM output for other uses like NeoPixels.

## Buttons and Slide Switch

- **Buttons** - There are two buttons on the right side of the Beret, connected to **GPIO #5** and **GPIO #6**. You can use these as inputs.
- **Slide switch** - There is a slide switch towards the center of the Beret connected to **GPIO #13**. This is not a power switch! It is basic slide switch, which is high or low depending on the position of the switch. You can use it as an input.

## STEMMA QT Connector

- **[STEMMA QT](https://learn.adafruit.com/introducing-adafruit-stemma-qt) -** This connector, on the left side of the Beret, allows you to connect to sensors and breakout boards with STEMMA QT / Qwiic connectors or to other things with **[various associated accessories](https://www.adafruit.com/category/619).**
- **SDA/SCL** - The I2C pins for the STEMMA QT connector are connected to the default **I2C** port on the Pi.
- **3.3V/GND** - The power for the STEMMA QT connector is 3.3V. Ground is the common ground for power and logic.

# Adafruit EYESPI Pi Beret

## Plugging in an EYESPI Cable

![](https://cdn-learn.adafruit.com/assets/assets/000/116/975/medium800/adafruit_products_edited_P1390328.jpg?1670356850)

You can connect an EYESPI compatible display to the EYESPI breakout board using an EYESPI cable. An EYESPI cable is an 18 pin flexible PCB (FPC). The FPC can only be connected properly in one orientation, so be sure to follow the steps below to ensure that your display and breakout are plugged in properly.

Each EYESPI cable has **blue stripes** on either end. On the other side of the cable, underneath the blue stripe, are the connector pins that make contact with the FPC connector pins on the display or breakout.

![adafruit_products_cableStripe.gif](https://cdn-learn.adafruit.com/assets/assets/000/116/970/medium640thumb/adafruit_products_cableStripe.jpg?1670356463)

To begin inserting an EYESPI cable to an FPC connector, gently lift the FPC connector black latch up.&nbsp;

![adafruit_products_liftLatch.gif](https://cdn-learn.adafruit.com/assets/assets/000/116/971/medium640thumb/adafruit_products_liftLatch.jpg?1670356608)

Then, insert the EYESPI cable into the open FPC connector by sliding the cable into the connector. You want to **see the blue stripe facing up towards you**. This inserts the cable pins into the FPC connector.

![adafruit_products_insertCable.gif](https://cdn-learn.adafruit.com/assets/assets/000/116/972/medium640thumb/adafruit_products_insertCable.jpg?1670356741)

To secure the cable, lower the FPC connector latch onto the EYESPI cable.

![adafruit_products_lowerLatch.gif](https://cdn-learn.adafruit.com/assets/assets/000/116/973/medium640thumb/adafruit_products_lowerLatch.jpg?1670356793)

Repeat this process for the FPC connector on your display. Again, ensure that the **blue stripe** on either end of the cable is facing up.

![adafruit_products_edited_P1390333.jpg](https://cdn-learn.adafruit.com/assets/assets/000/116/974/medium640/adafruit_products_edited_P1390333.jpg?1670356806)

# Adafruit EYESPI Pi Beret

## Python GIF Player Demo

Using the EYESPI Pi Beret is quite straightforward. Attach it to your Pi, plug in a display, and you're ready to go. This demo will test the display and button features of the Beret with an animated GIF player.

## Raspberry Pi Setup

To prepare the Pi for this demo, follow the [setup instructions here](https://learn.adafruit.com/pitft-linux-python-animated-gif-player/python-setup-2#setup-3044241).

Warning: 

## Hardware Setup

The first step is attaching the EYESPI Pi Beret to your Raspberry Pi, and then connecting a display using an EYESPI-compatible ribbon cable.

Attach the Beret by pressing the assembled header on the bottom of the Beret onto the GPIO header on the Raspberry Pi.&nbsp;

Then plug an EYESPI cable into the connector on the Beret, and into the connector on a compatible display.

![adafruit_products_EPB_assembled.jpg](https://cdn-learn.adafruit.com/assets/assets/000/124/123/medium640/adafruit_products_EPB_assembled.jpg?1693349700)

## GIF Player Example Code

Copy the following code into a file named **rgb\_display\_eyespi\_beret\_animated\_gif.py** , into whatever directory on your Raspberry Pi you wish to run it from.

https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display/blob/main/examples/rgb_display_eyespi_beret_animated_gif.py

This demo is explained in detail [here](https://learn.adafruit.com/pitft-linux-python-animated-gif-player/python-code). The explanation is for a slightly different version of the code, but most of it is identical. This demo code was rearranged a bit, and the pins are different. Everything else is the same.

Info: 

If you are using a display other than the 2.2", 2.4", 2.8", or 3.2" ILI9341 display, you'll need to comment out the first line under `# Create the display`, and uncomment the line below it that applies to your display. Check out the [demo explanation](https://learn.adafruit.com/pitft-linux-python-animated-gif-player/python-code) for details.

## Usage

Place two or more GIF files in the same directory as you saved the code file. You can find animated GIFs all over the internet. A great website for finding a large collection of them is [giphy.com](https://giphy.com/). Once you find them, you'll need to get them over to your Raspberry Pi. The easiest way would be to just use FTP or downloading them directly from the internet on your Pi if that's what you would prefer. Just make sure they're in the same folder as the script.

Then, run the code by typing the following into your command line.

`python3 rgb_display_eyespi_beret_animated_gif.py`

The first GIF should begin playing on the display.

![](https://cdn-learn.adafruit.com/assets/assets/000/124/166/medium800thumb/adafruit_products_EPB_kitten_gif.jpg?1693425828)

To cycle through the other GIFs, press the buttons on the Pi Beret. The button marked 6 will advance to the next one, and the button marked 5 will go back to the previous one.

# Adafruit EYESPI Pi Beret

## Downloads

## Files

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

# Schematic and Fab Print
![](https://cdn-learn.adafruit.com/assets/assets/000/124/164/medium800/adafruit_products_EPB_sch.png?1693422945)

![](https://cdn-learn.adafruit.com/assets/assets/000/124/165/medium800/adafruit_products_EPB_fab_print.png?1693422875 Dimensions are in mm.)


## Primary Products

### Adafruit EYESPI Pi Beret - Buttons, EYESPI and STEMMA QT

[Adafruit EYESPI Pi Beret - Buttons, EYESPI and STEMMA QT](https://www.adafruit.com/product/5783)
Raspberry Pi's make for handy lil computers, but they're really wonderful when you can connect all sorts of nifty hardware to them: color TFT or E-Ink displays, and sensors are our go-to favorites. Even better is when we make it fast and effortless to wire these up. With this new...

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

## Featured Products

### 2.0" 320x240 Color IPS TFT Display with microSD Card Breakout

[2.0" 320x240 Color IPS TFT Display with microSD Card Breakout](https://www.adafruit.com/product/4311)
This gorgeous IPS display breakout is the best way to add a small, colorful, and bright display to any project, with excellent visibility from any angle. Since the display uses 4-wire SPI to communicate and has its own pixel-addressable frame buffer, it can be used with every kind of...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4311)
[Related Guides to the Product](https://learn.adafruit.com/products/4311/guides)
### 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)
### OLED Breakout Board - 16-bit Color 1.27" w/microSD holder

[OLED Breakout Board - 16-bit Color 1.27" w/microSD holder](https://www.adafruit.com/product/1673)
We love our black and white monochrome displays but we also like to dabble with some color now and then. Our 1.27" color OLED displays are perfect when you need a small display with vivid, high-contrast 16-bit color. The visible portion of the OLED measures 1.27" diagonal and...

In Stock
[Buy Now](https://www.adafruit.com/product/1673)
[Related Guides to the Product](https://learn.adafruit.com/products/1673/guides)
### 2.2" 18-bit color TFT LCD display with microSD card breakout

[2.2" 18-bit color TFT LCD display with microSD card breakout](https://www.adafruit.com/product/1480)
This lovely little display breakout is the best way to add a small, colorful, and bright display to any project. Since the display uses 4-wire SPI to communicate and has its own pixel-addressable frame buffer, it can be used with every kind of microcontroller. Even a very small one with low...

In Stock
[Buy Now](https://www.adafruit.com/product/1480)
[Related Guides to the Product](https://learn.adafruit.com/products/1480/guides)
### OLED Breakout Board - 16-bit Color 1.5" w/microSD holder

[OLED Breakout Board - 16-bit Color 1.5" w/microSD holder](https://www.adafruit.com/product/1431)
We love our black and white monochrome displays but we also like to dabble with some color now and then. Our big 1.5" color OLED displays are perfect when you need a small display with vivid, high-contrast 16-bit color. The visible portion of the OLED measures 1.5" diagonal and...

Out of Stock
[Buy Now](https://www.adafruit.com/product/1431)
[Related Guides to the Product](https://learn.adafruit.com/products/1431/guides)
### 2.8" TFT LCD with Cap Touch Breakout Board w/MicroSD Socket

[2.8" TFT LCD with Cap Touch Breakout Board w/MicroSD Socket](https://www.adafruit.com/product/2090)
Add some jazz & pizazz to your project with a color capactive&nbsp;touchscreen LCD. This TFT display is big (2.8" diagonal) bright (4 white-LED backlight) and colorful! 240x320 pixels with individual RGB pixel control, this has way more resolution than a black and white 128x64...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2090)
[Related Guides to the Product](https://learn.adafruit.com/products/2090/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

- [Adafruit 2.0" 320x240 Color IPS TFT Display](https://learn.adafruit.com/2-0-inch-320-x-240-color-ips-tft-display.md)
- [Adafruit 1.27" and 1.5" Color OLED Breakout Board](https://learn.adafruit.com/adafruit-1-5-color-oled-breakout-board.md)
- [Desktop or Laptop TFT Sidekick With FT232H](https://learn.adafruit.com/tft-sidekick-with-ft232h.md)
- [Electronic Animated Eyes for ARM Microcontrollers](https://learn.adafruit.com/animated-electronic-eyes.md)
- [Kitty Toe Bean Keypad with Color TFT](https://learn.adafruit.com/kitty-toe-bean-paw-keypad-color-tct.md)
- [CircuitPython Hardware: ILI9341 TFT & FeatherWing](https://learn.adafruit.com/micropython-hardware-ili9341-tft-and-featherwing.md)
- [Eye of Newt](https://learn.adafruit.com/eye-of-newt.md)
- [Adafruit 1.3" and 1.54" 240x240 Wide Angle TFT LCD Displays](https://learn.adafruit.com/adafruit-1-3-and-1-54-240-x-240-wide-angle-tft-lcd-displays.md)
- [2.2" TFT Display](https://learn.adafruit.com/2-2-tft-display.md)
- [Adafruit 2.13" 250x122 Quad-Color eInk](https://learn.adafruit.com/adafruit-2-13-250x122-quad-color-eink.md)
- [Adafruit 2.8" and 3.2" Color TFT Touchscreen Breakout v2](https://learn.adafruit.com/adafruit-2-8-and-3-2-color-tft-touchscreen-breakout-v2.md)
- [User-space SPI TFT Python Library - ILI9341](https://learn.adafruit.com/user-space-spi-tft-python-library-ili9341-2-8.md)
- [CircuitPython Animated Sprite Pendants](https://learn.adafruit.com/circuitpython-sprite-animation-pendant-mario-clouds-flying-toasters.md)
- [Animated Snake Eyes Bonnet for Raspberry Pi](https://learn.adafruit.com/animated-snake-eyes-bonnet-for-raspberry-pi.md)
- [CircuitPython Display Support Using displayio](https://learn.adafruit.com/circuitpython-display-support-using-displayio.md)
