# Adafruit NeoPixel Driver BFF

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/116/773/medium800thumb/adafruit_products_5645-02_1.jpg?1669046413)

Adafruit's QT Py boards are a great way to make very small microcontroller projects that pack a ton of power - and now there is a way for you to quickly add a&nbsp;[strand of NeoPixels](https://www.adafruit.com/category/168)&nbsp;with a 5V level shifter and a detachable JST PH connector. It's an excellent way to make tiny wearable, cosplay or IoT projects with dazzling LEDs.

![](https://cdn-learn.adafruit.com/assets/assets/000/123/224/medium800/adafruit_products_5645-07.jpg?1690985965)

We call this the&nbsp; **Adafruit NeoPixel Driver&nbsp;BFF** &nbsp;- a "Best Friend Forever". When you were a kid, you may have learned about the "buddy" system. Well, this product is kinda like that! A board that will watch your QT Py's back and give it the power and support to drive NeoPixel strips, rings, and panels.

![](https://cdn-learn.adafruit.com/assets/assets/000/123/225/medium800/adafruit_products_5645-00.jpg?1690985976)

This PCB is designed to fit onto the back of any QT Py or Xiao&nbsp;board, it can be soldered into place or use pin and socket headers to make it removable. Onboard is a 74AHCT125 single-gate level shifter that will take pin A3's output, and shift it up to 5V using the USB power as a reference. The USB power, ground and shifted data is then piped out to a JST PH 2mm 3-pin connector.

![](https://cdn-learn.adafruit.com/assets/assets/000/123/226/medium800/adafruit_products_5645-02.jpg?1690985995)

If using one of our&nbsp;[NeoPixel strips with a JST-PH connector on them already](https://www.adafruit.com/?q=neopixel+JST+PH&sort=BestMatch), you can just plug it right in for instant lights. If you're using a common JST SH (black in-line)&nbsp;connector on the strips, you can use a&nbsp;[JST-PH-to-female-header cable](https://www.adafruit.com/product/3894)&nbsp;and use that to plug into the pins on the input of the SH port and/or can jam the wires into the header sockets.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/123/227/medium800/adafruit_products_5645-06.jpg?1690986005)

Note that we connect the USB 5V power directly out to the NeoPixel power pin on the JST PH connector and PH connectors are only rated for about 2 Amps, so it's not for powering directly more than maybe 30-60 NeoPixels (less if they're on full white brightness).&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/123/228/medium800/adafruit_products_5645-04.jpg?1690986015)

We include some header that you can solder to your QT Py.&nbsp;[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
- Uses the 5V input via USB Type-C connector on QT Py to Power 30ish NeoPixels
- Level-shifted data from pin&nbsp; **A3 default** , can solder-jumper select&nbsp; **SCL** ,&nbsp; **TX** ,&nbsp; **RX** ,&nbsp; **SCK&nbsp;** or&nbsp; **MOSI**
- For driving any WS2812/WS2811/NeoPixel LEDs

**NeoPixels and QT Py are not included**.

# Adafruit NeoPixel Driver BFF

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/116/776/medium800/adafruit_products_front_Back.jpg?1669049479)

The default input pin is **A3**.

## STEMMA JST PH

- [**STEMMA JST PH**](https://learn.adafruit.com/introducing-adafruit-stemma-qt)&nbsp;- 2mm pitch STEMMA JST port with connections for **+** ,&nbsp; **-** &nbsp;and&nbsp; **Sig** to connect to a NeoPixel strip. Plug in a [3-pin STEMMA JST PH cable](https://www.adafruit.com/category/1019) with headers or a [NeoPixel strip with a JST PH plug](https://www.adafruit.com/product/4801).&nbsp;

## Output Pin

- **Sig** - this is the signal output pin for the BFF. It is a through hole pad located in the center of the board. It is connected to **pin A3** by default. It outputs the data signal to a connected NeoPixel strip.

## A3 Jumper

- **A3 jumper&nbsp;** - This jumper is located on the front of the board behind the signal pin of the JST PH port. If cut, the **Sig** pin is no longer connected to **A3** and you can solder one of the solder-jumpers closed to change the output pin.

## Pin Select Solder-jumpers

- Five solder-jumpers are available to change the **sig** nal output pin for the NeoPixel BFF. They are placed horizontally on the board and are located next to their corresponding pin names. You can choose to solder one of the solder-jumpers for one of the following pins:
  - **SCL**
  - **TX**
  - **RX**
  - **SCK**
  - **MOSI**

# Adafruit NeoPixel Driver BFF

## CircuitPython

It's easy to use the&nbsp; **NeoPixel Driver BFF** with CircuitPython and the [Adafruit\_CircuitPython\_NeoPixel](https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel) module. This module allows you to easily write Python code that lets you control NeoPixels.&nbsp;

## CircuitPython Microcontroller Wiring

First, wire up a NeoPixel Driver BFF to your board exactly as shown below. Here's an example of wiring a QT Py RP2040 to the BFF with a strip of [NeoPixels with a JST PH plug](https://www.adafruit.com/product/4801):

Plug the JST PH NeoPixel strip into the NeoPixel Driver BFF JST PH port.

![adafruit_products_demoFritz_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/116/780/medium640/adafruit_products_demoFritz_bb.jpg?1669132873)

Connect the QT Py RP2040 with plug headers into the NeoPixel Driver 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, [check out this Learn Guide](https://learn.adafruit.com/how-to-solder-headers/female-headers).

![adafruit_products_5645-01.jpg](https://cdn-learn.adafruit.com/assets/assets/000/116/778/medium640/adafruit_products_5645-01.jpg?1669051515)

[How to Solder Headers Learn Guide](https://learn.adafruit.com/how-to-solder-headers/female-headers)
## CircuitPython Usage

To use with CircuitPython, you need to first install the NeoPixel library, and its 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, and copy the&nbsp; **entire&nbsp;**** lib **&nbsp;** folder **&nbsp;and the&nbsp;** code.py **&nbsp;file to your&nbsp;** CIRCUITPY**&nbsp;drive.

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

- **adafruit\_pixelbuf.mpy**
- **neopixel.mpy**

![CIRCUITPY](https://adafruit.github.io/Adafruit_CircuitPython_Bundle/neopixel_neopixel_rainbowio_simpletest.py.png )

## Example Code
https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel/blob/main/examples/neopixel_rainbowio_simpletest.py

![](https://cdn-learn.adafruit.com/assets/assets/000/116/781/medium800thumb/adafruit_products_5645-02_1.jpg?1669133144)

Once everything is saved to the&nbsp; **CIRCUITPY** &nbsp;drive, you'll see your connected NeoPixel strip cycle through a rainbow animation on a loop.

You can edit the variables in the code for the number of pixels, speed, brightness and pin number depending on your needs.

```python
NUMPIXELS = 12  # Update this to match the number of LEDs.
SPEED = 0.05  # Increase to slow down the rainbow. Decrease to speed it up.
BRIGHTNESS = 0.2  # A number between 0.0 and 1.0, where 0.0 is off, and 1.0 is max.
PIN = board.A3  # This is the default pin on the 5x5 NeoPixel Grid BFF.

pixels = neopixel.NeoPixel(PIN, NUMPIXELS, brightness=BRIGHTNESS, auto_write=False)
```

# Adafruit NeoPixel Driver BFF

## Python Docs

# Adafruit NeoPixel Driver BFF

## Arduino

Using the NeoPixel Driver BFF with Arduino involves wiring up the breakout to your Arduino-compatible QT Py or Xiao form factor board, installing the [Adafruit\_NeoPixel](https://github.com/adafruit/Adafruit_NeoPixel) library and running the provided example code.

## Wiring

Wire up a NeoPixel Driver BFF to your board exactly as shown below. Here's an example of wiring a QT Py RP2040 to the BFF with a strip of [NeoPixels with a JST PH plug](https://www.adafruit.com/product/4801):

Plug the JST PH NeoPixel strip into the NeoPixel Driver BFF JST PH port.

![adafruit_products_demoFritz_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/116/782/medium640/adafruit_products_demoFritz_bb.jpg?1669133269)

Connect the QT Py RP2040 with plug headers into the NeoPixel Driver 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, [check out this Learn Guide](https://learn.adafruit.com/how-to-solder-headers/female-headers).

![adafruit_products_5645-01.jpg](https://cdn-learn.adafruit.com/assets/assets/000/116/783/medium640/adafruit_products_5645-01.jpg?1669133283)

[How to Solder Headers Learn Guide](https://learn.adafruit.com/how-to-solder-headers/female-headers)
## Library Installation

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

![](https://cdn-learn.adafruit.com/assets/assets/000/116/777/medium800/adafruit_products_Arduino_Open_Library_Manager.png?1669050884)

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

Info: 

## Example Code
https://github.com/adafruit/Adafruit_NeoPixel/blob/master/examples/strandtest/strandtest.ino

Before running the code, change `LED_PIN` to A3.

```cpp
#include &lt;Adafruit_NeoPixel.h&gt;
#ifdef __AVR__
 #include &lt;avr/power.h&gt; // Required for 16 MHz Adafruit Trinket
#endif

// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1:
//#define LED_PIN    6
  #define LED_PIN    A3
```

Then, upload the sketch to your board. You'll see the attached NeoPixel strip go through the strand test. The strand test includes the color wipe animation in red, green and blue, the theater chase animation in white, red and blue, the rainbow swirl animation and the rainbow theater chase animation.

![](https://cdn-learn.adafruit.com/assets/assets/000/116/784/medium800thumb/adafruit_products_5645-02_1.jpg?1669133365)

# Adafruit NeoPixel Driver BFF

## Arduino Docs

# Adafruit NeoPixel Driver BFF

## Downloads

## Files

- [74AHC125 single-gate level shifter datasheet](https://cdn-shop.adafruit.com/datasheets/74AHC125.pdf)
- [EagleCAD PCB files on GitHub](https://github.com/adafruit/Adafruit-NeoPixel-Driver-BFF-PCB)
- [3D Models on GitHub](https://github.com/adafruit/Adafruit_CAD_Parts/tree/main/5645%20NeoPixel%20Driver%20BFF)
- [Fritzing object in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20NeoPixel%20Driver%20BFF.fzpz)

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

![](https://cdn-learn.adafruit.com/assets/assets/000/116/823/medium800/adafruit_products_fab_nobsilk.png?1669667467)

![](https://cdn-learn.adafruit.com/assets/assets/000/116/790/medium800/adafruit_products_PCB-Component.jpg?1669148986)


## Primary Products

### Adafruit NeoPixel Driver BFF Add-On for QT Py and Xiao

[Adafruit NeoPixel Driver BFF Add-On for QT Py and Xiao](https://www.adafruit.com/product/5645)
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 quickly add a [strand of NeoPixels](https://www.adafruit.com/category/168) with a 5V level shifter and a detachable JST PH connector. It's an...

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

## Featured Products

### Adafruit NeoPixel LED Strip with 3-pin JST PH 2mm Connector

[Adafruit NeoPixel LED Strip with 3-pin JST PH 2mm Connector](https://www.adafruit.com/product/3919)
Plug in and glow, this **Adafruit NeoPixel LED Strip with JST PH Connector** has **30 total LEDs** in a **"60 LED per meter" spacing** , and is 0.5 meters long, in classy Adafruit Black. Its not too long, but has lots of glowing action.<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/3919)
[Related Guides to the Product](https://learn.adafruit.com/products/3919/guides)
### Adafruit NeoPixel LED Strip with 3-pin JST Connector - 1 meter

[Adafruit NeoPixel LED Strip with 3-pin JST Connector - 1 meter](https://www.adafruit.com/product/4801)
Plug in and glow, this **Adafruit NeoPixel LED Strip with JST PH Connector** has **30 total LEDs** &nbsp;and is 1&nbsp;meter&nbsp;long, in classy Adafruit Black. It's not too long but has lots of glowing action.[...](https://www.adafruit.com/product/3900)

In Stock
[Buy Now](https://www.adafruit.com/product/4801)
[Related Guides to the Product](https://learn.adafruit.com/products/4801/guides)
### STEMMA JST PH 2mm 3-Pin to Male Header Cable - 200mm

[STEMMA JST PH 2mm 3-Pin to Male Header Cable - 200mm](https://www.adafruit.com/product/3893)
This cable will let you turn a JST PH 3-pin cable port into 3 individual wires with high-quality 0.1" male header plugs on the end. We're carrying these to match up with our Hallowing, for extending and connecting sensors or LEDs - and the wires are even color coded!

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

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

## Related Guides

- [NeoPixel Remote: IR Control with WLED](https://learn.adafruit.com/neopixel-remote-ir-control-with-wled.md)
- [FunHouse Parking Assistant](https://learn.adafruit.com/funhouse-parking-assistant.md)
- [Feather Guitar Hero Adapter](https://learn.adafruit.com/feather-guitar-hero-adapter.md)
- [HalloWing Light Paintstick](https://learn.adafruit.com/hallowing-light-paintstick.md)
- [Synchronized NeoPixel Shoelaces with WLED](https://learn.adafruit.com/neopixel-shoelaces-with-wled.md)
- [WiFi Jellyfish Lantern with WLED](https://learn.adafruit.com/wifi-jellyfish-lantern-with-wled.md)
- [PyGamer NeoPixel Controller](https://learn.adafruit.com/pygamer-neopixel-controller.md)
- [Wireless LED Juggling Balls with ESP-NOW](https://learn.adafruit.com/wireless-juggling-balls-esp-now.md)
- [Cheerlights Holiday Wreath with Animations](https://learn.adafruit.com/cheerlights-led-animations.md)
- [HalloWing M4 Tombstone](https://learn.adafruit.com/hallowing-tombstone.md)
- [AdaBox 009](https://learn.adafruit.com/adabox009.md)
- [Last-Minute Halloween Accoutrements with HalloWing](https://learn.adafruit.com/last-minute-halloween-accoutrements-with-hallowing.md)
- [Adafruit Hallowing M4](https://learn.adafruit.com/adafruit-hallowing-m4.md)
- [Circuit Playground or Hallowing Jack-o'-Lantern](https://learn.adafruit.com/circuit-playground-jack-o-lantern.md)
- [Getting Started with Raspberry Pi Pico and CircuitPython](https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circuitpython.md)
