# Neopixel Jewel 10 Minute Necklace

## Introduction

https://youtu.be/lA6plY2BUZY

Show off your style and make any outfit shine with this simple neopixel jewel necklace. &nbsp;Customize the code&nbsp;and design your own light effects, and change it up as often as you like to match different outfits or environments.

This is a wonderful intro&nbsp;project for learning to make things with&nbsp;neopixels and microcontrollers. &nbsp;Get your kids involved -- they'll love showing off their glowing handmade necklace. &nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/041/833/medium800/led_pixels_neopixel_jewel_necklace.jpg?1495124289)

# Materials

Find a pendant with a translucent or transparent center. &nbsp;The pendant should be at least 2 inches across. &nbsp;You can add your own diffusion material or find a pendant that works as-is. &nbsp;

I found this&nbsp;"black lace" pendant at Michael's craft store a few years ago and it's just perfect for this project.

If you don't have anything appropriate on-hand, you can always assemble the light&nbsp;module and take it&nbsp;with you to the craft or bead store. &nbsp;They will probably wonder what you're up to, but I imagine&nbsp;that if you're reading this guide, you're already used to that.

Remember to get a necklace cord as well if your pendant doesn't come with one.

Info: 

# Electronics
### Lithium Ion Polymer Battery - 3.7v 100mAh

[Lithium Ion Polymer Battery - 3.7v 100mAh](https://www.adafruit.com/product/1570)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of ~100mAh for a total of about 0.4 Wh. If you need a larger battery, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/1570)
[Related Guides to the Product](https://learn.adafruit.com/products/1570/guides)
![Lithium Ion Polymer Battery 3.7v 100mAh with JST 2-PH connector](https://cdn-shop.adafruit.com/640x480/1570-00.jpg)

### 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)
![Pink polished fingers holding a Adafruit GEMMA M0 - Miniature wearable electronic platform. ](https://cdn-shop.adafruit.com/product-videos/640x480/3501-05.jpg)

### NeoPixel Jewel - 7 x 5050 RGB LED with Integrated Drivers

[NeoPixel Jewel - 7 x 5050 RGB LED with Integrated Drivers](https://www.adafruit.com/product/2226)
Be the belle of the ball with the NeoPixel Jewel! &nbsp;We fit seven of our tiny&nbsp;5050 (5mm x 5mm) smart RGB LEDs onto a beautiful, round&nbsp;PCB with mounting holes and a chainable design to create what we think is our most elegant (and evening-wear appropriate) NeoPixel board...

In Stock
[Buy Now](https://www.adafruit.com/product/2226)
[Related Guides to the Product](https://learn.adafruit.com/products/2226/guides)
![NeoPixel Jewel - 7 x 5050 RGB LED wired to Trinket, lit up rainbow](https://cdn-shop.adafruit.com/640x480/2226-01.jpg)

### Hook-up Wire Spool Set - 22AWG Solid Core - 6 x 25 ft

[Hook-up Wire Spool Set - 22AWG Solid Core - 6 x 25 ft](https://www.adafruit.com/product/1311)
Perfect for bread-boarding, free wiring, etc. This box contains **6** spools of **solid-core** wire. These&nbsp;spools of solid-core wires are&nbsp;easily soldered to,&nbsp;keeps its shape pretty well when bent&nbsp;and is rated 80C and 300V (UL AWM style 1007). We...

In Stock
[Buy Now](https://www.adafruit.com/product/1311)
[Related Guides to the Product](https://learn.adafruit.com/products/1311/guides)
![Hook-up Wire Spool Set in box with 6 colorful wires coming out](https://cdn-shop.adafruit.com/640x480/1311-04.jpg)

### Adafruit Micro Lipo - USB LiIon/LiPoly charger

[Adafruit Micro Lipo - USB LiIon/LiPoly charger](https://www.adafruit.com/product/1304)
Oh so adorable, this is the tiniest little lipo charger, so handy you can keep it any project box! Its also easy to use. Simply plug in the gold plated contacts into any USB port and a 3.7V/4.2V lithium polymer or lithium ion rechargeable battery into the JST plug on the other end. There are...

In Stock
[Buy Now](https://www.adafruit.com/product/1304)
[Related Guides to the Product](https://learn.adafruit.com/products/1304/guides)
![Top view of Adafruit Micro Lipo - USB LiIon/LiPoly charger - v1 above a 2-pin JST cable.](https://cdn-shop.adafruit.com/640x480/1304-06.jpg)

# Tools

- A good [soldering iron](https://www.adafruit.com/product/180)
- [Solder](https://www.adafruit.com/product/1886)
- [Wire strippers](https://www.adafruit.com/product/147)
- Flush&nbsp;[Wire cutters](https://www.adafruit.com/product/152)
- Hot glue gun

If you're just starting out and ready to get serious, or if you're tired of using sub-par tools you inherited from your uncle, treat yourself to&nbsp;[Lady Ada's Electronics Toolkit](https://www.adafruit.com/product/136). &nbsp;It's got all the essentials for getting started with electronics. &nbsp;

A good tool is worth its weight in gold and will save you hours of frustration in the long run.

# Neopixel Jewel 10 Minute Necklace

## Arduino Code

Info: 

### Software Setup

If this is your first time using Arduino and Gemma, take a look at [Adafruit Gemma M0](../../../../adafruit-gemma-m0/overview) or&nbsp;[Introducing Gemma](../../../../introducing-gemma/introduction)&nbsp;to get a guided tour. &nbsp;You'll also want to be sure the Adafruit\_NeoPixel library is installed in Arduino:

(`Sketch > Include Library > Manage Libraries...`)

In the demo video, we're using the Strandtest code that comes with the Neopixel library. &nbsp;Strandtest is great to start with, but it's a little bit "loud" for a necklace. &nbsp;

Here is some slightly quieter code that displays a gorgeous rainbow effect with three different modes for variations in speed and interest.

Go to your Tools menu and select Gemma from the list of boards. &nbsp;Plug your Gemma into your computer via the onboard USB port. &nbsp;Press the "reset" button on your Gemma and wait for the blinky red light, then click the upload button in Arduino.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/NeoPixel_Jewel_10_Minute_Necklace/NeoPixel_Jewel_10_Minute_Necklace.ino

Taking a look at the code, you'll see that there are a few

variables at the top you can change.

**Adafruit\_NeoPixel pixels = Adafruit\_NeoPixel(40, PIN);**

Change this number to make the rainbow appear more or less spread out. &nbsp;We really only have 7 pixels, but to slow the animation down I've told the Gemma we have 40.

**&nbsp;pixels.setBrightness(40);**

Set the brightness here. &nbsp;Max is 255, but that will blind people. &nbsp;40 is just bright enough that people will notice both you AND your necklace.

**rainbowHold(20);**  
 **delay(500);**

Play with these numbers to speed up or slow down the animation, or to keep one animation running longer.

&nbsp;

# If you encounter trouble…

Any time you&nbsp;hit a roadblock&nbsp;with a neopixel&nbsp;project, we’ll usually ask that you start with the “strandtest” example from our own Adafruit\_NeoPixel library.&nbsp;

You’ll find the strandtest example under&nbsp; **File→Sketchbook→Libraries→Adafruit\_NeoPixel→strandtest**

**If strandtest fails to run, this suggests a hardware issue** …for example, connecting to the wrong Gemma&nbsp;pin. &nbsp;Make sure you've wired your neopixels to pin 1, and that they're wired to the "in" rather than the "out" pin on the Jewel.

# Neopixel Jewel 10 Minute Necklace

## CircuitPython Code

![](https://cdn-learn.adafruit.com/assets/assets/000/049/242/medium800/led_pixels_gemma-cp.jpg?1513115391)

 **GEMMA&nbsp;M0** &nbsp;boards can&nbsp;run&nbsp; **CircuitPython** &nbsp;— a different approach to programming compared to Arduino sketches. In fact,&nbsp; **CircuitPython comes&nbsp;factory pre-loaded on GEMMA&nbsp;M0**. If you’ve overwritten it with an Arduino sketch, or just want to learn the basics of setting up and using CircuitPython, this is explained in the&nbsp;[**Adafruit GEMMA&nbsp;M0 guide**](../../../../adafruit-gemma-m0/circuitpython-setup-1).

Info: 

Below is CircuitPython code that works&nbsp;similarly (though not exactly the same) as the Arduino sketch shown on a prior page. To use this, plug the GEMMA M0 into USB…it should show up on your computer as a small&nbsp; **flash drive** …then edit the file “ **code.py** ” with your text editor of choice. Select and copy the code below and paste it into that file,&nbsp; **entirely replacing its contents** &nbsp;(don’t mix it in with lingering bits of old code). When you save the file, the code should&nbsp; **start running almost immediately** &nbsp;(if not, see notes at the bottom of this page).

**If GEMMA M0 doesn’t show up as a&nbsp;drive, follow the GEMMA M0 guide link above to prepare the board for CircuitPython.**

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

This code requires the&nbsp; **neopixel.py** &nbsp;library. A factory-fresh board will have this already installed. If you’ve just reloaded the board with CircuitPython, create the “lib” directory and then&nbsp;[download neopixel.py from Github](https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel).

# Neopixel Jewel 10 Minute Necklace

## Assembly

![](https://cdn-learn.adafruit.com/assets/assets/000/041/829/medium800/led_pixels_jewel.png?1495050689)

Assembly is very straightforward:

- Gemma **VBAT/VOUT** to Neopixel **PWR +**
- Gemma **GND** to Neopixel **GND**
- Gemma **D1** to Neopixel **IN**

Plug in your battery and glue everything into place, and you're done!

See the video at the beginning of this guide for a detailed time lapse of the whole assembly process.


## Guide Products

### Lithium Ion Polymer Battery - 3.7v 100mAh

[Lithium Ion Polymer Battery - 3.7v 100mAh](https://www.adafruit.com/product/1570)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of ~100mAh for a total of about 0.4 Wh. If you need a larger battery, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/1570)
[Related Guides to the Product](https://learn.adafruit.com/products/1570/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)
### NeoPixel Jewel - 7 x 5050 RGB LED with Integrated Drivers

[NeoPixel Jewel - 7 x 5050 RGB LED with Integrated Drivers](https://www.adafruit.com/product/2226)
Be the belle of the ball with the NeoPixel Jewel! &nbsp;We fit seven of our tiny&nbsp;5050 (5mm x 5mm) smart RGB LEDs onto a beautiful, round&nbsp;PCB with mounting holes and a chainable design to create what we think is our most elegant (and evening-wear appropriate) NeoPixel board...

In Stock
[Buy Now](https://www.adafruit.com/product/2226)
[Related Guides to the Product](https://learn.adafruit.com/products/2226/guides)
### Hook-up Wire Spool Set - 22AWG Solid Core - 6 x 25 ft

[Hook-up Wire Spool Set - 22AWG Solid Core - 6 x 25 ft](https://www.adafruit.com/product/1311)
Perfect for bread-boarding, free wiring, etc. This box contains **6** spools of **solid-core** wire. These&nbsp;spools of solid-core wires are&nbsp;easily soldered to,&nbsp;keeps its shape pretty well when bent&nbsp;and is rated 80C and 300V (UL AWM style 1007). We...

In Stock
[Buy Now](https://www.adafruit.com/product/1311)
[Related Guides to the Product](https://learn.adafruit.com/products/1311/guides)
### Adafruit Micro Lipo - USB LiIon/LiPoly charger

[Adafruit Micro Lipo - USB LiIon/LiPoly charger](https://www.adafruit.com/product/1304)
Oh so adorable, this is the tiniest little lipo charger, so handy you can keep it any project box! Its also easy to use. Simply plug in the gold plated contacts into any USB port and a 3.7V/4.2V lithium polymer or lithium ion rechargeable battery into the JST plug on the other end. There are...

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

## Related Guides

- [Sewable NeoPixels](https://learn.adafruit.com/flora-rgb-smart-pixels.md)
- [Adafruit NeoPixel Überguide](https://learn.adafruit.com/adafruit-neopixel-uberguide.md)
- [Yoga Pose Chime](https://learn.adafruit.com/yoga-pose-chime.md)
- [NeoPixel NanoRing](https://learn.adafruit.com/neopixel-nanoring-gemma.md)
- [Wind Blowing Emoji Prop](https://learn.adafruit.com/wind-face-emoji.md)
- [Trash-Built Robotic Fish](https://learn.adafruit.com/trash-robo-fish.md)
- [Guardian Shield+ Zelda Breath of the Wild](https://learn.adafruit.com/guardian-shield-zelda-breath-of-the-wild.md)
- [Bunny Ears with MakeCode](https://learn.adafruit.com/bunny-ears-with-makecode.md)
- [Superhero Power Gauntlet](https://learn.adafruit.com/superhero-power-gauntlet.md)
- [NeoPixel LED Mickey Ears](https://learn.adafruit.com/neopixel-led-mickey-ears.md)
- [CompuCanvas 101 - Transitions](https://learn.adafruit.com/compucanvas-101.md)
- [Anatomical 3D Printed Beating Heart with MakeCode](https://learn.adafruit.com/anatomical-3d-printed-beating-heart-with-makecode.md)
- [LED Acrylic Sign](https://learn.adafruit.com/led-acrylic-sign.md)
- [AM Radio Morse Code Paddle](https://learn.adafruit.com/am-radio-morse-code-paddle.md)
- [Easy Sparkle Pocket T-Shirt](https://learn.adafruit.com/easy-sparkle-pocket-t-shirt.md)
- [Best Beginner Boards for Teachers](https://learn.adafruit.com/best-beginner-boards-for-teachers.md)
- [LED NeoPixel Corset with Circuit Playground Express and MakeCode](https://learn.adafruit.com/led-corset-with-circuit-playground-and-makecode.md)
