# Adafruit NeoPixel Breakout

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/130/682/medium800thumb/adafruit_products_5975-04_1.jpg?1718296172)

This little breakout makes it easy to add a single NeoPixel to a project, with mounting holes and a pluggable connector. The PCB is less than 0.5"x0.5" and comes with two [3-pin JST SH 1mm pitch connectors](https://www.adafruit.com/product/5755) for input and output. On the opposite side, a 5050 (5mm square) classic RGB NeoPixel that can be powered and controlled with 3.3V or 5V power.

![](https://cdn-learn.adafruit.com/assets/assets/000/130/683/medium800/adafruit_products_5975-03.jpg?1718296236)

The two mounting holes are M2 size and have clearance for the screw head, or could be used for sewing onto a fabric backing or attaching to a small model. Of course this design will never be as affordable as a pre-made strand with dozens of LEDs, but there's probably some time it would be useful - especially since it can be easily swapped out.

![](https://cdn-learn.adafruit.com/assets/assets/000/130/684/medium800/adafruit_products_5975-02.jpg?1718296263)

Comes as a single NeoPixel, no cables included so check out our [JST SH compatible cables in plug](https://www.adafruit.com/product/5755) or [socket](https://www.adafruit.com/product/5765).

# Adafruit NeoPixel Breakout

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/130/688/medium800/adafruit_products_double.jpg?1718299656)

## NeoPixel

On the back of the breakout is the star of the show: the NeoPixel. It is a 5050 (5mm square) classic RGB NeoPixel that can be powered and controlled with 3.3V or 5V power and logic.

## JST SH Input

- [**JST SH**](https://www.adafruit.com/product/5755) - On the left side of the breakout, above the **In** label on the board silk, is a 1mm pitch JST port for use with [3-pin JST SH cables](https://www.adafruit.com/product/5765). It has connections for:
  - **GND** - common ground for power and data. It is the black wire on the JST SH cable.
  - **VIN** - power input to the NeoPixel. Provide 3.3V or 5V power. Give it the same power as the logic level of your microcontroller - e.g. for a 5V microcontroller like Arduino, use 5V. It is the red wire on the JST SH cable.
  - **In** - data input for the NeoPixel. It is the white wire on the JST SH cable.

## JST SH Output

- [**JST SH**](https://www.adafruit.com/product/5755) - On the right side of the breakout, above the **Out** label on the board silk, is a 1mm pitch JST port for use with [3-pin JST SH cables](https://www.adafruit.com/product/5765). It has connections for:
  - **GND** - common ground for power and data. It is the black wire on the JST SH cable.
  - **VIN** - power input to the NeoPixel. Provide 3.3V or 5V power. power input to the NeoPixel. Provide 3.3V or 5V power. Give it the same power as the logic level of your microcontroller - e.g. for a 5V microcontroller like Arduino, use 5V. It is the red wire on the JST SH cable.
  - **Out** - data output for the NeoPixel. It can be used to daisy chain multiple NeoPixels together by carrying the data input signal. It is the white wire on the JST SH cable.

# Adafruit NeoPixel Breakout

## CircuitPython and Python

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

You can use this driver with any CircuitPython microcontroller board or with a computer that has GPIO and Python [thanks to Adafruit\_Blinka, our CircuitPython-for-Python compatibility library](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux). You should note though that many single board computers (SBCs) don't have NeoPixel support due to the precision timing required to send data.

Info: Many single board computers don't have NeoPixel support due to the precision timing required to send data

## CircuitPython Microcontroller Wiring

Here is how you'll wire the breakout to a Feather RP2040 with a JST SH cable:

- **Feather 3V** to **NeoPixel JST SH VIN (red wire)**
- **Feather GND** to **NeoPixel JST SH GND (black wire)**
- **Feather pin 5** to **NeoPixel JST SH In (white wire)**

![adafruit_products_featherJST_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/694/medium640/adafruit_products_featherJST_bb.jpg?1718303022)

### JST SH Compatible 1mm Pitch 3 Pin to Premium Male Headers Cable

[JST SH Compatible 1mm Pitch 3 Pin to Premium Male Headers Cable](https://www.adafruit.com/product/5755)
If you fancy connecting to&nbsp;anything else with a JST SH compatible 3-pin connector, this cable will do the trick. For example, our [NeoPixel JST Breakout boards](https://www.adafruit.com/product/5975), or [UPDI Friend](https://www.adafruit.com/product/5879), or <a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/5755)
[Related Guides to the Product](https://learn.adafruit.com/products/5755/guides)
![angled shot of 100mm long JST-SH 3-pin cable with male headers.](https://cdn-shop.adafruit.com/640x480/5755-02.jpg)

## Python Computer Wiring

Since there are _dozens_ of Linux computers/boards you can use, we will show wiring for Raspberry Pi. For other platforms, [please visit the guide for CircuitPython on Linux to see whether your platform is supported](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).

Here's the Raspberry Pi wired to the breakout with a JST SH cable:

Info: On the Raspberry Pi, NeoPixels must be connected to GPIO10, GPIO12, GPIO18 or GPIO21 to work!

- **Pi 3V** to **NeoPixel JST SH VIN (red wire)**
- **Pi GND** to **NeoPixel JST SH GND (black wire)**
- **Pi GPIO18** to **NeoPixel JST SH In (white wire)**

On the Raspberry Pi,&nbsp; **NeoPixels must be connected to GPIO10, GPIO12, GPIO18 or GPIO21** to work!

![adafruit_products_piJST_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/695/medium640/adafruit_products_piJST_bb.jpg?1718303035)

### JST SH 1mm Pitch 3 Pin to Socket Headers Cable - 100mm long

[JST SH 1mm Pitch 3 Pin to Socket Headers Cable - 100mm long](https://www.adafruit.com/product/5765)
If you fancy connecting to&nbsp;anything else with a JST SH compatible 3-pin connector, this cable will do the trick. For example, our [NeoPixel JST Breakout boards](https://www.adafruit.com/product/5975), or [UPDI Friend](https://www.adafruit.com/product/5879), or <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/5765)
[Related Guides to the Product](https://learn.adafruit.com/products/5765/guides)
![Angled shot of 100mm long 3-pin JST-SH cable with socket connectors.](https://cdn-shop.adafruit.com/640x480/5765-02.jpg)

## Python Installation of NeoPixel Library

You'll need to install the **Adafruit\_Blinka** library that provides the CircuitPython support in Python. This may also require enabling I2C on your platform and verifying you are running Python 3. [Since each platform is a little different, and Linux changes often, please visit the CircuitPython on Linux guide to get your computer ready](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux)!

Once that's done, from your command line run the following command:

- `pip3 install adafruit-circuitpython-neopixel`

If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use CircuitPython on Python 2.x, it isn't supported!

## CircuitPython Usage

To use with CircuitPython, you need to first install the **Adafruit\_CircuitPython\_NeoPixel** library, and its dependencies, into the **lib** folder on your **CIRCUITPY** drive. Then you need to update **code.py** with the example script.

Thankfully, we can do this in one go. In the example below, click the **Download Project Bundle** button below to download the necessary libraries and the **code.py** file in a zip file. Extract the contents of the zip file, and copy the **entire**  **lib**  **folder** and the **code.py** file to your **CIRCUITPY** drive.

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

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

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

## Python Usage

Once you have the library `pip3` installed on your computer, copy or download the following example to your computer, and run the following, replacing **code.py** with whatever you named the file:

`python3 code.py`

## Example Code

**If running CircuitPython:** Once everything is saved to the **CIRCUITPY** drive, [connect to the serial console](https://learn.adafruit.com/welcome-to-circuitpython/kattni-connecting-to-the-serial-console) to see the data printed out!

**If running Python:** The console output will appear wherever you are running Python.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/NeoRGB_Stemma_Examples/circuitpython/code.py

The code has a check to determine if you are running the code on a Raspberry Pi or not. If you are, the NeoPixel pin is set as **GPIO18**. Otherwise, the NeoPixel pin is set as **D5**. Once the loop starts, you'll see your NeoPixel cycle through the colors of the rainbow.

![](https://cdn-learn.adafruit.com/assets/assets/000/130/693/medium800thumb/adafruit_products_5975-04_1.jpg?1718302395)

# Adafruit NeoPixel Breakout

## Python Docs

# Adafruit NeoPixel Breakout

## Arduino

Using the NeoPixel Breakout with Arduino involves wiring up the breakout to your Arduino-compatible microcontroller, installing the [Adafruit\_NeoPixel](https://github.com/adafruit/Adafruit_NeoPixel) library and running the provided example code.

## Wiring

Here is how you'll wire the breakout to an Adafruit Metro with a JST SH cable:

- **Metro 5V** to **NeoPixel JST SH VIN (red wire)**
- **Metro GND** to **NeoPixel JST SH**** &nbsp;GND (black wire)**
- **Metro pin 6** to **NeoPixel JST SH** **In (white wire)**

![adafruit_products_metroJST_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/696/medium640/adafruit_products_metroJST_bb.jpg?1718303111)

### JST SH Compatible 1mm Pitch 3 Pin to Premium Male Headers Cable

[JST SH Compatible 1mm Pitch 3 Pin to Premium Male Headers Cable](https://www.adafruit.com/product/5755)
If you fancy connecting to&nbsp;anything else with a JST SH compatible 3-pin connector, this cable will do the trick. For example, our [NeoPixel JST Breakout boards](https://www.adafruit.com/product/5975), or [UPDI Friend](https://www.adafruit.com/product/5879), or <a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/5755)
[Related Guides to the Product](https://learn.adafruit.com/products/5755/guides)
![angled shot of 100mm long JST-SH 3-pin cable with male headers.](https://cdn-shop.adafruit.com/640x480/5755-02.jpg)

## Library Installation

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

![](https://cdn-learn.adafruit.com/assets/assets/000/130/690/medium800/adafruit_products_Arduino_Open_Library_Manager.png?1718302242)

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

![](https://cdn-learn.adafruit.com/assets/assets/000/130/691/medium800/adafruit_products_neopixelLib.png?1718302288)

Info: There are no additional dependencies for the Adafruit NeoPixel library.

## Example Code
https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/NeoRGB_Stemma_Examples/arduino_rainbow_neorgb/arduino_rainbow_neorgb.ino

Upload the sketch to your board. You'll see your NeoPixel cycle through a rainbow swirl animation.

![](https://cdn-learn.adafruit.com/assets/assets/000/130/692/medium800thumb/adafruit_products_5975-04_1.jpg?1718302360)

# Adafruit NeoPixel Breakout

## Arduino Docs

# Adafruit NeoPixel Breakout

## Downloads

## Files

- [NeoPixel Datasheet](https://cdn-shop.adafruit.com/datasheets/WS2812B.pdf)
- [EagleCAD PCB Files on GitHub](https://github.com/adafruit/Adafruit-NeoPixel-Breakout-PCB)
- [3D Models on GitHub](https://github.com/adafruit/Adafruit_CAD_Parts/tree/main/5975%20NeoPixel%20Breakout)
- [Fritzing object in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20NeoPixel%20JST%20SH%20Breakout.fzpz)

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

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

![](https://cdn-learn.adafruit.com/assets/assets/000/130/733/medium800/adafruit_products_5975_NeoPixel_Breakout.jpg?1718643623)


## Primary Products

### Adafruit NeoPixel Breakout with JST SH Connectors

[Adafruit NeoPixel Breakout with JST SH Connectors](https://www.adafruit.com/product/5975)
This little breakout makes it easy to add a single NeoPixel to a project, with mounting holes and a pluggable connector. The PCB is less than 0.5"x0.5" and comes with two [3-pin JST SH 1mm pitch connectors](https://www.adafruit.com/product/5755)&nbsp;for input and output....

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

## Featured Products

### JST SH Compatible 1mm Pitch 3 Pin to Premium Male Headers Cable

[JST SH Compatible 1mm Pitch 3 Pin to Premium Male Headers Cable](https://www.adafruit.com/product/5755)
If you fancy connecting to&nbsp;anything else with a JST SH compatible 3-pin connector, this cable will do the trick. For example, our [NeoPixel JST Breakout boards](https://www.adafruit.com/product/5975), or [UPDI Friend](https://www.adafruit.com/product/5879), or <a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/5755)
[Related Guides to the Product](https://learn.adafruit.com/products/5755/guides)
### JST SH 1mm Pitch 3 Pin to Socket Headers Cable - 100mm long

[JST SH 1mm Pitch 3 Pin to Socket Headers Cable - 100mm long](https://www.adafruit.com/product/5765)
If you fancy connecting to&nbsp;anything else with a JST SH compatible 3-pin connector, this cable will do the trick. For example, our [NeoPixel JST Breakout boards](https://www.adafruit.com/product/5975), or [UPDI Friend](https://www.adafruit.com/product/5879), or <a...></a...>

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

## Related Guides

- [4x4 Rotary Encoder MIDI Messenger](https://learn.adafruit.com/4x4-rotary-encoder-midi-messenger.md)
- [Pico W YBox3](https://learn.adafruit.com/pico-w-ybox3.md)
- [Adafruit Simple Soil Moisture Sensor](https://learn.adafruit.com/adafruit-simple-soil-moisture-sensor.md)
- [Adafruit Feather RP2040 RFM69](https://learn.adafruit.com/feather-rp2040-rfm69.md)
- [Tiny LED WiFi Companion Cube](https://learn.adafruit.com/tiny-led-wifi-cube.md)
- [Quickstart - Raspberry Pi RP2040 with BLE and CircuitPython](https://learn.adafruit.com/quickstart-raspberry-pi-rp2040-with-ble-and-circuitpython.md)
- [Adafruit 7-Segment LED FeatherWings](https://learn.adafruit.com/adafruit-7-segment-led-featherwings.md)
- [Cyber Cat MIDI Keyboard](https://learn.adafruit.com/midi-cyber-cat-keyboard.md)
- [DotStar Fortune Necklace with Bluetooth and Touch](https://learn.adafruit.com/dotstar-fortune-necklace.md)
- [Esenciales para CircuitPython](https://learn.adafruit.com/esenciales-para-circuitpython.md)
- [Cluetooth Scanner](https://learn.adafruit.com/cluetooth-scanner.md)
- [Qualia S3 Compass](https://learn.adafruit.com/qualia-s3-compass.md)
- [Adafruit Radio Bonnets with OLED Display - RFM69 or RFM9X](https://learn.adafruit.com/adafruit-radio-bonnets.md)
- [Adafruit Feather RP2040 RFM95](https://learn.adafruit.com/feather-rp2040-rfm95.md)
- [CircuitPython Chiptune Player](https://learn.adafruit.com/circuitpython-chiptune-player.md)
