# Sewable NeoPixels

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/027/390/medium800/led_pixels_flora_collin_tie_full.jpg?1440527634)

What's a wearable project without LEDs? These tiny smart pixels are our favorite thing. Designed specifically for wearables, [we found the brightest RGB LEDs available (an eye-blistering ~3800mcd)](http://adafruit.com/products/1260 "Link: http://adafruit.com/products/619") and paired them with a constant-current driver chip. The contacts are easily sewn with conductive thread. Use this guide to test your first pixel and start on a blinding wearables project with Circuit Playground Express, FLORA or GEMMA!

_Pictured above:&nbsp;[LED Ampli-Tie](../../../led-ampli-tie)_

![](https://cdn-learn.adafruit.com/assets/assets/000/027/391/medium800/led_pixels_1260-00.jpg?1440527669)

## Prerequisite guides

Before you begin, familiarize yourself with&nbsp;the following tutorials:

- [Adafruit Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express)
- [Getting Started with FLORA](../../../../getting-started-with-flora)
- [Introducing GEMMA](../../../../introducing-gemma)
- [NeoPixel Uberguide](../../../../adafruit-neopixel-uberguide)
- [Conductive Thread](../../../../conductive-thread)

## Lots of Pixels?

Each pixel draws as much as 60mA (all three RGB LEDs on for full brightness white). In theory, FLORA&nbsp;can drive up to 500 pixels at 30 FPS (above which it will&nbsp;run out of RAM). Circuit Playground Express can drive more than that.&nbsp; However, above&nbsp;about 20 pixels (and/or if the overall length of conductive thread exceeds ~6 feet/2 meters), the nontrivial resistance of the thread adds up and can affect the power supply. For large quantities of pixels over 20 or if you need to insulate your circuit, you should upgrade to [silicone coated&nbsp;stranded core wire](https://www.adafruit.com/search?q=silicone+cover+wire&b=1),&nbsp;which will&nbsp;provide better conductivity&nbsp;for the pixels - the current draw will add up fast!

Info: 

![](https://cdn-learn.adafruit.com/assets/assets/000/002/544/medium800/flora_1060insitu_LRG.jpg?1396784270)

_Pictured above: a FLORA prototype with v1 pixels_

# Sewable NeoPixels

## Hook up alligator clips

![](https://cdn-learn.adafruit.com/assets/assets/000/069/730/medium800/led_pixels_cpx_alligatorclips.jpg?1548106119)

Hook up three alligator clips to your Circuit Playground Express as shown: one to **VOUT** , one to **A1** , and one to **GND**. I used a red wire for power and a black wire for ground for clarity, but it doesn't matter what color you use.

Hook up the other ends of your alligator clips to a single pixel. **VOUT** (red) connects to the **+** on the pixel, **GND** (black) to the **-** , and **A1** (yellow) to the pad marked with an arrow pointing towards the LED on the tiny board (not away from it).

![](https://cdn-learn.adafruit.com/assets/assets/000/027/373/medium800/led_pixels_alligator-clips-flora-and-pixel-v2.jpg?1440521465)

Wiring on a FLORA is very similar.&nbsp; Just wire to **D6** instead of **A1**.&nbsp; **VBATT** and **VOUT** are more or less the same, for our purposes.

![](https://cdn-learn.adafruit.com/assets/assets/000/027/375/medium800/led_pixels_alligator-clips-gemma-and-pixel-v2.jpg?1440521563)

On GEMMA or Gemma M0, the wiring is very similar. Hook up **VOUT** (red in the picture above) to **+** , **GND** to **-** (black above), and **D1** to the inward facing arrow (yellow above).

# Sewable NeoPixels

## Code with MakeCode

![](https://cdn-learn.adafruit.com/assets/assets/000/069/735/medium800/led_pixels_cpx_makecode.jpg?1548108308)

[MakeCode](http://www.makecode.com) is Microsoft's drag-and-drop code editor, and it's about the easiest way to get your pixels showing color.&nbsp; &nbsp;

Click the appropriate button below to go to the MakeCode **strandtest** project. Click the Download button on that page, and a file called **circuitplayground-strandtest.uf2** (for Circuit Playground Express) or **maker-strandtest.uf2** (for Gemma M0) will download to your computer.&nbsp;&nbsp;

Plug your Circuit Playground Express into your computer via a USB port and double-click the tiny "reset" button in the center of the board. All the onboard lights will turn green, and a drive will appear on your computer called **CPLAYBOOT** or **GEMMABOOT**. Drag the file you just downloaded onto this drive.&nbsp;&nbsp;

The pixel you have connected will light up in a succession of colors followed by a rainbow animation.

[StrandTest for Circuit Playground Express](https://makecode.com/_3TMh7Y417RFK)
[StrandTest for Gemma M0](https://makecode.com/_5bMR1AMxM7ir)
 **Note: MakeCode will NOT work on a FLORA or GEMMA v1 board.&nbsp;** For those older boards you must use the Arduino code method.&nbsp; However, Arduino will work on Circuit Playground Express or Gemma M0 as well as the older boards.

![](https://cdn-learn.adafruit.com/assets/assets/000/069/736/medium800/led_pixels_cpx_strandtest.jpg?1548108414)

# Sewable NeoPixels

## Code with Arduino

## Install the NeoPixel Arduino library

Open up the Arduino library manager:

![](https://cdn-learn.adafruit.com/assets/assets/000/084/334/medium800/led_pixels_library_manager_menu.png?1573839617)

Search for the&nbsp; **Adafruit Neopixel&nbsp;** library and install it

![](https://cdn-learn.adafruit.com/assets/assets/000/084/335/medium800/led_pixels_neopixel.png?1573839680)

We also have a great tutorial on Arduino library installation at:  
[http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use](http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use "Link: http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use")

![](https://cdn-learn.adafruit.com/assets/assets/000/027/374/medium800/led_pixels_alligator-clips-flora-and-pixel-lit-up-v2.jpg?1440521512)

Connect your FLORA and computer with a USB cable.

## Now upload!

Install the [NeoPixel library](https://github.com/adafruit/Adafruit_NeoPixel) and go to **File --\> Examples --\> Adafruit\_NeoPixel --\> strandtest.**

![](https://cdn-learn.adafruit.com/assets/assets/000/008/644/medium800/flora_Screen_Shot_2013-05-14_at_2.48.57_PM.png?1396869761)

If you cannot find that file in the dropdown menu go back up and reinstall the library.

This will launch a window containing the sample sketch. Upload it to your FLORA or GEMMA with the Upload button.

![](https://cdn-learn.adafruit.com/assets/assets/000/002/550/medium800/flora_uploadcode.jpg?1396784369)

Once successfully uploaded to your FLORA or GEMMA, the pixel will flash and fade different colors. Congrats, you've tested your pixel!   
  
**We do test each pixel in the factory, but you should use this method to test that all three colors (red, green, blue) work on each of your pixels before sewing them into your project!**

![](https://cdn-learn.adafruit.com/assets/assets/000/027/377/medium800/led_pixels_alligator-clips-gemma-and-pixel-lit-up-v2.jpg?1440521652)

For GEMMA, you'll need to change the pin number in the Arduino sketch before uploading. Change "6" to "1":

![](https://cdn-learn.adafruit.com/assets/assets/000/021/918/medium800/flora_Screen_Shot_2014-12-23_at_4.36.55_PM.png?1419371697)

Then upload the sample code to GEMMA by pressing the reset button (the red LED should start pulsing) and clicking the "upload" button in the Arduino software.

# Sewable NeoPixels

## Sewing more pixels

https://youtu.be/eGtGoPhjmcc

![](https://cdn-learn.adafruit.com/assets/assets/000/027/379/medium800thumb/led_pixels_gemma-d1-stitching.jpg?1448319641)

The pixels are chainable - so you only need 1 pin/wire to control as many LEDs as you like. They're easy to sew, and the chainable design means no crossed [conductive threads](http://www.adafruit.com/products/641). The output of one pixel connects directly to the input of the next.

To begin sewing, stitch around the data pin of your microcontroller ( **A1** on Circuit Playground, **D1** on GEMMA or Gemma M0 and **D6** on FLORA are ideal&nbsp;because they're right between power and ground), and stitch over to your first pixel.

![](https://cdn-learn.adafruit.com/assets/assets/000/027/380/medium800thumb/led_pixels_gemma-neopixel-input-stitching.jpg?1448319657)

Make sure that each arrow points away from the microcontroller in a line. Stitch around the input pad tightly, even knotting the thread here to form an extra sturdy connection.

![](https://cdn-learn.adafruit.com/assets/assets/000/027/387/medium800thumb/led_pixels_sealing-conductive-thread-knot.jpg?1448319683)

Stitch back to the thread origin and tie the two ends in a square knot. Use clear nail polish to seal this knot and pull the ends tight until it dries. Do not clip the thread tails until&nbsp;later on.

![](https://cdn-learn.adafruit.com/assets/assets/000/027/388/medium800thumb/led_pixels_sewing-ground-bus.jpg?1448319698)

All the positive pads (marked with a **+** ) connect together to form one power bus. Likewise all the negative pads (marked with a **-** ) connect together to form one ground bus.

![](https://cdn-learn.adafruit.com/assets/assets/000/027/383/medium800/led_pixels_gemma-pixels-sewn-in-back.jpg?1440522371)

Here's what a three-pixel circuit looks like from the back. See the individual data connections in the center and the continuous power and ground buses above and below?

![](https://cdn-learn.adafruit.com/assets/assets/000/027/389/medium800thumb/led_pixels_snip-threads-clean-up.jpg?1448319712)

Double check your knots are secure before clipping all your thread tails. Clean up your work space so there aren't any stray bits of conductive thread hanging around.

![](https://cdn-learn.adafruit.com/assets/assets/000/027/376/medium800/led_pixels_gemma-pixels-sewn-in.jpg?1440521603)

Visually inspect your circuit to check for shorts or stray threads.

![](https://cdn-learn.adafruit.com/assets/assets/000/027/393/medium800thumb/led_pixels_three-pixels-glowing.jpg?1448319724)

Plug your microcontroller into your computer with a USB cable. Change the number of pixels in the Arduino sketch or MakeCode project to match the number of pixels in your projects, and make sure the pin number matches what you sewed to.&nbsp; Upload the strandtest sample code as you did when testing a pixel earlier in this guide. Your pixels should light up and animate different colors and patterns.

If they don't all come on or some later in the chain are flickering, your stitches might not be snug enough against the pads of the circuit board. Double check your sewing and reinforce it where necessary (with the circuit off/unplugged).

![](https://cdn-learn.adafruit.com/assets/assets/000/027/378/medium800/led_pixels_gemma-pixels-sewn-in-lit-up.jpg?1440521708)

The library for these pixels is very similar to our [Adafruit\_WS2801](http://learn.adafruit.com/12mm-led-pixels/code "Link: http://learn.adafruit.com/12mm-led-pixels/code")[library for other types of RGB pixels](http://learn.adafruit.com/12mm-led-pixels/code "Link: http://learn.adafruit.com/12mm-led-pixels/code").

# Sewable NeoPixels

## Project Ideas

https://youtu.be/IWDrLOOkyaQ

[Light up Angler Fish Embroidery](../../../../light-up-angler-fish-embroidery)

https://www.youtube.com/watch?v=AwfeGkE-wk4

[NeoPixel Coat Buttons](../../../../neopixel-coat-buttons)

https://youtu.be/Cg3uBXMrshI

[Sparkle Skirt with FLORA Motion Sensor](../../../../sparkle-skirt/)

https://youtu.be/uVAC8efNfp8

[Textile Potentiometer Hoodie](../../../../textile-potentiometer-hoodie)

https://www.youtube.com/watch?v=gBRODuwfYy4

[NeoPixel Tiara](../../../../neopixel-tiara)

https://youtu.be/Wuqd7JNdLTY

[Close Encounters Hat](../../../../close-encounters-hat)

https://www.youtube.com/watch?v=k_AdfEPK0XQ

[Light-Activated Pixel Heart](../../../../light-activated-pixel-heart)

https://www.youtube.com/watch?v=5Edya0ppWco

[Space Face LED Galaxy Makeup](../../../../space-face-led-galaxy-makeup)

https://www.youtube.com/watch?v=J0E2kGlMjJM

[Pac Man Pixel Suspenders](../../../../pac-man-pixel-suspenders)

https://www.youtube.com/watch?v=TPNk2BRWX64

[Chameleon Scarf with FLORA Color Sensor](../../../../chameleon-scarf)

# Sewable NeoPixels

## Downloads

## Files

- [Fritzing object in Adafruit Fritzing library](https://github.com/adafruit/Fritzing-Library)
- [EagleCAD PCB files on GitHub](https://github.com/adafruit/Adafruit-Flora-Smart-NeoPixel)
- [WS2812 Datasheet](https://cdn-shop.adafruit.com/datasheets/WS2812.pdf)
- [SK6812 Datasheet](https://cdn-shop.adafruit.com/product-files/1138/SK6812+LED+datasheet+.pdf)

## NeoPixel Schematic
![](https://cdn-learn.adafruit.com/assets/assets/000/035/843/medium800/led_pixels_schem.png?1474479547)

## Fabrication Print
![](https://cdn-learn.adafruit.com/assets/assets/000/035/844/medium800/led_pixels_fabprint.png?1474479557)


## Featured Products

### Flora RGB Smart NeoPixel version 3 - Pack of 4

[Flora RGB Smart NeoPixel version 3 - Pack of 4](https://www.adafruit.com/product/1260)
What's a wearable project without LEDs? Our favorite part of the Flora platform is these tiny smart pixels. Designed specifically for wearables, these updated Flora NeoPixels have ultra-cool technology: these ultra-bright LEDs have a constant-current driver cooked right into the LED...

In Stock
[Buy Now](https://www.adafruit.com/product/1260)
[Related Guides to the Product](https://learn.adafruit.com/products/1260/guides)
### Flora RGB Smart NeoPixel version 3 - Sheet of 20

[Flora RGB Smart NeoPixel version 3 - Sheet of 20](https://www.adafruit.com/product/1559)
So, you want lots and lots of NeoPixels? And you want them for less? Not a problem! Here's a sheet of Flora NeoPixels fresh from the (reflow) oven. Cut them off as you need 'em and save a pretty penny while you're at it.  
  
**Each order comes with 20 pixels on a...**

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

[Circuit Playground Express](https://www.adafruit.com/product/3333)
 **Circuit Playground Express** is the next step towards a perfect introduction to electronics and programming. We've taken the original Circuit Playground Classic and made it even better! Not only did we pack even more sensors in, we also made it even easier to...

In Stock
[Buy Now](https://www.adafruit.com/product/3333)
[Related Guides to the Product](https://learn.adafruit.com/products/3333/guides)
### Adafruit GEMMA M0 - Miniature wearable electronic platform

[Adafruit GEMMA M0 - Miniature wearable electronic platform](https://www.adafruit.com/product/3501)
The **Adafruit Gemma M0** is a super small microcontroller board, with just enough built-in to create many simple projects. It may look small and cute: round, about the size of a quarter, with friendly alligator-clip sew pads. But do not be fooled! The Gemma M0 is incredibly...

In Stock
[Buy Now](https://www.adafruit.com/product/3501)
[Related Guides to the Product](https://learn.adafruit.com/products/3501/guides)
### FLORA - Wearable electronic platform: Arduino-compatible

[FLORA - Wearable electronic platform: Arduino-compatible](https://www.adafruit.com/product/659)
FLORA is Adafruit's fully-featured wearable electronics platform. It's a round, sewable, Arduino-compatible microcontroller designed to empower amazing wearables projects.FLORA comes with Adafruit's support, [tutorials and...](http://learn.adafruit.com/category/flora)

In Stock
[Buy Now](https://www.adafruit.com/product/659)
[Related Guides to the Product](https://learn.adafruit.com/products/659/guides)
### Small Alligator Clip Test Lead (set of 12)

[Small Alligator Clip Test Lead (set of 12)](https://www.adafruit.com/product/1008)
Connect this to that without soldering using these handy mini alligator clip test leads. 15" cables with alligator clip on each end, color coded. You get 12 pieces in 6 colors. Strong and grippy, these always come in handy! We often use these in conjunction with a multimeter so we...

Out of Stock
[Buy Now](https://www.adafruit.com/product/1008)
[Related Guides to the Product](https://learn.adafruit.com/products/1008/guides)
### Short Wire Alligator Clip Test Lead (set of 12)

[Short Wire Alligator Clip Test Lead (set of 12)](https://www.adafruit.com/product/1592)
Connect this to that without soldering using these handy mini alligator clip test leads. Approximately 4.5" overall cables with alligator clip on each end, color coded. You get 12 pieces in 6 colors. Strong and grippy, these always come in handy! We often use these in conjunction with a...

In Stock
[Buy Now](https://www.adafruit.com/product/1592)
[Related Guides to the Product](https://learn.adafruit.com/products/1592/guides)
### Stainless Thin Conductive Thread - 2 ply - 23 meter/76 ft

[Stainless Thin Conductive Thread - 2 ply - 23 meter/76 ft](https://www.adafruit.com/product/640)
After months of searching, we finally have what we consider to be the ultimate conductive thread. It's thin, strong, smooth, and made completely of 316L stainless steel. Once you start working with this thread you'll quickly agree its optimal for any wearables work!  
  
This...

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

## Related Guides

- [Adafruit Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express.md)
- [Sensor Plotting with Mu and CircuitPython](https://learn.adafruit.com/sensor-plotting-with-mu-and-circuitpython.md)
- [FLORA + FONA](https://learn.adafruit.com/flora-plus-fona.md)
- [3D Printed LED-Animation BMO](https://learn.adafruit.com/3d-printed-led-animation-bmo.md)
- [Cyberpunk Spikes](https://learn.adafruit.com/cyberpunk-spikes.md)
- [Con Badge with Circuit Playground Express](https://learn.adafruit.com/circuit-playground-express-con-badge.md)
- [Light of Your Life Wedding Bouquet](https://learn.adafruit.com/light-of-your-life-wedding-bouquet.md)
- [Bunny Ears with MakeCode](https://learn.adafruit.com/bunny-ears-with-makecode.md)
- [Animatronic Glowing Medusa Headdress](https://learn.adafruit.com/animatronic-glowing-medusa-headdress.md)
- [Jewel Hair Stick](https://learn.adafruit.com/jewel-hair-stick.md)
- [3D Printed LED Fire Horns](https://learn.adafruit.com/3d-printed-led-fire-horns.md)
- [CircuitPython Essentials](https://learn.adafruit.com/circuitpython-essentials.md)
- [Crickit Dancing Marionette Kit](https://learn.adafruit.com/universal-marionette-with-crickit.md)
- [SMSsenger Bag](https://learn.adafruit.com/smssenger-bag.md)
- [3D Printed Unicorn Horn](https://learn.adafruit.com/3d-printed-unicorn-horn.md)
- [NeoPixel LED Cortana Costume](https://learn.adafruit.com/neopixel-led-cortana-costume.md)
