# Four Seasons Fairy Bottle Lanterns

## Overview

https://youtu.be/TyhPDHYE2fs

There's something magical about fairy lights in bottles. They evoke dreams of endless summer nights: catching fireflies at the bottom of the garden, telling ghost stories by firelight, or cuddling up with a book while a thunderstorm rages outside.&nbsp;

This project uses a Circuit Playground Express to control nine beautiful, crafty fairy bottles hanging from the branches of an indoor tree sculpture. Capacitive touch metal buttons select color modes based on the four seasons: a relaxing rainbow for summer, flickering candlelight for autumn, raindrops and lighting for winter, and a beautiful energetic and colorful animation for spring.

![](https://cdn-learn.adafruit.com/assets/assets/000/088/109/medium800/led_strips_fairybottles_pink.jpeg?1580934883)

This is a fairly advanced project with a lot of tricky wiring and soldering. The coding is also fairly involved, creating four different modes and switching between them.

None of the steps are terribly difficult in-and-of themselves, but there are a lot of steps and a lot of things that can go wrong. But the end result is stunning in its beautiful simplicity, so with a bit of patience and plenty of time, you can make something wonderful.

## Parts
### 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)
![A Black woman's manicured hand holds a round microcontroller with lit up LEDs.](https://cdn-shop.adafruit.com/640x480/3333-05.jpg)

### Adafruit Mini Skinny NeoPixel Digital RGB LED Strip - 60 LED/m

[Adafruit Mini Skinny NeoPixel Digital RGB LED Strip - 60 LED/m](https://www.adafruit.com/product/2964)
So thin. So mini. So teeeeeeny-tiny. It's the 'skinny' version of our classic NeoPixel strips!

These NeoPixel strips have 60 digitally-addressable pixel Mini LEDs per meter and are very affordable and are only 7.5 mm wide, 5 mm if you remove the strip from the...

In Stock
[Buy Now](https://www.adafruit.com/product/2964)
[Related Guides to the Product](https://learn.adafruit.com/products/2964/guides)
![Video of an Adafruit NeoPixel Digital RGB LED Strip with all the LEDs illuminating various colors. ](https://cdn-shop.adafruit.com/product-videos/640x480/2964-06.jpg)

### Part: NeoPixel Dots
quantity: 1
4" pitch NeoPixel Dots
[NeoPixel Dots](https://www.adafruit.com/product/3631)

### Part: Splitter
quantity: 3
4-1 JST Connector Splitter
[Splitter](https://www.adafruit.com/product/402)

### Part: 2-Pin Connectors
quantity: 20
2-Pin JST Connector Set
[2-Pin Connectors](https://www.adafruit.com/product/2880)

### Part: 4-Pin Connector
quantity: 1
4-pin JST Connector
[4-Pin Connector](https://www.adafruit.com/product/578)

### Part: Wire
quantity: 3
26 AWG Wire in Various Colors
[Wire](https://www.adafruit.com/product/1970)

### Part: USB Cable
quantity: 1
2m USB Cable
[USB Cable](https://www.adafruit.com/product/4148)

### Part: Power Supply
quantity: 1
5V 2A Power Supply
[Power Supply](https://www.adafruit.com/product/276)

### Materials Needed

#### Bottles

- Small glass bottles of various shapes & sizes
- Corks to fit in the bottles
- Iridescent cellophane or fantasy film
- Leather or rope scraps for hanging

#### Controller Pad

- Conductive metal charms (buy or make your own)
- Galvanized wire
- E6000 glue

#### Tools Needed

- Soldering iron & accessories
- Heat gun
- Wire strippers & snips
- Scissors or utility knife

![](https://cdn-learn.adafruit.com/assets/assets/000/087/673/medium800/led_strips_05_shrink.jpeg?1580842466)

### Wire Connectors

There are a LOT of wire connections in this project. For the connections to the bottles, I used the traditional soldering-iron-and-heat-shrink attachment method. For the connections that needed to be made in place up in the tree, I made really good use of a new type of heat shrink connectors.

These connectors come in varying sizes and are really cool! They've simplified the process of connecting wire to one or two steps, and eliminated the need to use a soldering iron for wire-to-wire connections. The colored lines are hot-melt glue, and the silver bit in the middle is low temp solder.&nbsp;

[I found them on Amazon here](https://www.amazon.com/dp/B07X5L7FTS/ref=cm_sw_em_r_mt_dp_U_O2BoEb0CKTF5Q).

Twist your wires together securely, then slide the heat shrink connector over your twisted wire. Heat the whole thing with a heat gun and you've soldered, sealed, and glued your connection in one step. These things are a game-changer for in-place installations where a soldering iron is impractical to use. Magic!

![](https://cdn-learn.adafruit.com/assets/assets/000/088/110/medium800/led_strips_fairybottles_three.jpeg?1580934909)

https://youtu.be/SRdBKxFp4MA

# Four Seasons Fairy Bottle Lanterns

## Decorate the Bottles

![](https://cdn-learn.adafruit.com/assets/assets/000/087/577/medium800/led_strips_fairy_bottle_sunlight.jpeg?1580070777)

I chose a variety of shapes, sizes and colors for my bottles. I love the look of "theme and variation" this creates.

I ended up using mostly clear bottles, but threw in a few colored ones as well. The colored bottles add another dimension of interest to the final artwork, since they change the look of the LED animations -- for example, the red bottle doesn't let blue light through at all, so it goes "dark" during a mostly blue animation, while any white light animations look red. More variety, less coding!

I covered some of my bottles with Fantasy Film and some with plain craft-store iridescent cellophane. [Fantasy film](https://www.artglitter.com/) is a product that looks like cellophane, but it's a little thicker, and bonds to itself seamlessly when heat is applied. It works quite a bit better than the cellophane for wrapping the bottles, but the cellophane is much cheaper and easier to obtain -- they have it at most craft stores in the wrapping paper section.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/031/440/medium800/sensors_fantasy_film_1.jpg?1459357028)

Get out your heat gun and cut a bunch of strips of [fantasy film](http://www.artglitter.com/) or iridescent cellophane.&nbsp; Layer the film over your bottle and gently hit it with the heat. &nbsp;Watch it shrink and bond around your bottle (man this is fun!) Put a bunch of layers on until you're happy with the diffusion of the light shining through.

![sensors_fantasy_film_2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/031/441/medium640/sensors_fantasy_film_2.jpg?1459357157)

![sensors_fantasy_film_3.jpg](https://cdn-learn.adafruit.com/assets/assets/000/031/442/medium640/sensors_fantasy_film_3.jpg?1459357169)

It's easier to work with smaller pieces of fantasy film, since they stick to each other really well. I had more success using a big piece of cellophane and gently shrinking it to cover the whole bottle.

![](https://cdn-learn.adafruit.com/assets/assets/000/031/443/medium800/sensors_leather.jpg?1459357229)

Cut a bunch of strips into your leather scraps and artfully wrap it around the bottle, tying and gluing as needed. I left a few long strips and a long strand at the top, securely wrapped around the bottle's neck. This will bear the weight of the bottle and tie to a tree branch, so be sure it's secure. It's a much better idea to hang the bottle from the leather than from the wires, which will break if you tug on them too hard.

![](https://cdn-learn.adafruit.com/assets/assets/000/031/444/medium800/sensors_bottle.jpg?1459357326)

![](https://cdn-learn.adafruit.com/assets/assets/000/088/111/medium800/led_strips_fairybottles_singlepink.jpeg?1580934926)

# Four Seasons Fairy Bottle Lanterns

## Code with MakeCode

![](https://cdn-learn.adafruit.com/assets/assets/000/087/676/medium800/led_strips_makecode_complete.jpg?1580160984)

Microsoft's MakeCode editor is a great way to get your Circuit Playground Express to do things without having to muck about in actual code. It's a fun drag-and-drop editor that's easy to use and sneakily teaches you how to write code while you're making pretty things that light up.

The MakeCode project linked below has four different modes, one for each season of the year, plus a mode for "off". Each mode is triggered by a capacitive touch pad on the Circuit Playground Express. You can download the completed code and get up and running right away, or you can follow along and create your own code, adding your own customizations as you go.

[Complete Fairy Bottles MakeCode](https://makecode.com/_6pz3bCTtK4ei)
Our code has four different color modes: a high-energy "party" mode for spring, a relaxing rainbow for summer, flickering candle light for autumn, and a rainstorm with lighting for winter. This will make our MakeCode project a bit complex, so if it's your first time using MakeCode, head over to the [MakeCode Intro Guide](https://learn.adafruit.com/makecode/what-is-makecode) and play around with a couple of the beginner projects to get a feel for how it all works. Once you're ready to go, head over to [makecode.adafruit.com](https://makecode.adafruit.com/)[,](http://www.makecode.com,) roll up your sleeves and it's time to dive in.&nbsp;

Click the Circuit Playground Express and then **New Project**. You'll see your workspace, with a Circuit Playground on the left, some tabs in the middle and your workspace on the right. Click the **LOOPS** tab, and find `on_start`. Drag it into your workspace.

![leds_makecode_00onstart.jpg](https://cdn-learn.adafruit.com/assets/assets/000/069/659/medium640/leds_makecode_00onstart.jpg?1547854258)

Whatever you put into the `on_start` loop will run once, when you first boot up your Circuit Playground Express. Whatever you put in the `forever` loop will run over and over again, forever.

Let's tell the Circuit Playground Express that we attached some lights to pin **A1**. Click the **LIGHT** tab and another sub-tab will appear labeled **NEOPIXEL**. Anything in the **LIGHT** tab refers to the lights on the face of the Circuit Playground Express itself.&nbsp; Anything in the **NEOPIXEL** tab will refer to lights that you add. Find `set strip to create strip on A1 with 200 pixels` (or whatever your total number of pixels in ALL bottles is, plus a couple extra) and drag it onto your workspace inside the `on_start` loop.

![leds_makecode_01createstrip.jpg](https://cdn-learn.adafruit.com/assets/assets/000/069/660/medium640/leds_makecode_01createstrip.jpg?1547854422)

## Variables

A variable is a placeholder or container for a number. We use them so we can change numbers willy-nilly, on the fly, or in multiple places at once. We'll set up all our variables now so we can use them later on in our code. Click the **VARIABLES** tab to create your variables.

![](https://cdn-learn.adafruit.com/assets/assets/000/088/011/medium800/led_strips_mc01_variables.jpg?1580770698)

I've created a variable for each of the four seasons: `autumn`, `spring`, `summer`, and `winter`, as well as one called `sleep` (for "off" mode).

I've got one called `clock`, which we'll use to time our lightning strikes in the winter animation.

There's one called `hue`, which we'll use in the spring and autumn animations to randomize our colors.

I've also created `strip2`, `strip3`, and `strip4`. These will be used to break up our strip into arrays, or chunks of LEDs which we can call individually, to apply animations to part of our strip at a time. We'll use these in our autumn animation as well.

### Functions

I've set up a separate function for each of the seasons and one for "off". Functions are a fancy way of creating a separate box for a bunch of code which we can call when we want it, but it'll stay out of our way the rest of the time. You can create them from the **FUNCTIONS** menu which is found under the **ADVANCED** tab.

Name your functions something other than "spring" or "summer" -- since we already have variables set up using those names, we'll need to call our functions something different.

### Spring / "Party" Mode
![](https://cdn-learn.adafruit.com/assets/assets/000/088/012/medium800/led_strips_mc02_function_party.jpg?1580771017)

For spring, I want a lively animated mode with lots of color and motion. I'm using the **Photon** feature in this mode. **Photon** lights an LED in white and moves it along your LED strip, trailing color behind it.

By setting the pen color to our `hue` variable and changing our hue each time the photon moves, we're able to have the photon trail a rainbow behind it instead of just a solid color. Adding `strip rotate` gives more interest, as each light will slowly animate through the rainbow while it's waiting for the photon to come by. You can play with the numbers until you get an effect you like.

The **photon** feature has a bit of a bug, in that the white photon light tends to stay stuck "on" when you change to a different color mode. To work around this, I added a line to all the other modes setting the photon to LED #199 (shown below).

In reality I have fewer LEDs than 199 -- my total number is probably somewhere around 195 (I lost count at some point!). So setting the white photon light to #199 means it's moved off my strip entirely and is happily stuck "on" someplace in Imagination Land where it won't interfere with my project.

### Autumn / "Flicker" Mode
![](https://cdn-learn.adafruit.com/assets/assets/000/088/014/medium800/led_strips_mc_flicker_onstart.jpg?1580771995)

For autumn, I want a halloween-y candle flame effect in my bottles. This is very similar to the flame effect I wrote for my paper mache dragon project, and [I go into more detail about it here](https://learn.adafruit.com/light-up-paper-dragon-wall-sconce/light-effects-code). I've added a little more complexity to this animation for this project.

Looking at the function: I'm starting with the `photon` bug fix described above. The next line creates the candle flicker. I'm choosing a random LED (the first `pick random`), then setting its hue to something between 0 and 30, and its intensity (`val`) to something between 0 and 200. This will make all the LEDs color in various shades of red and orange, with randomized brightness. Then, I pause for a random number of milliseconds to make the flicker.

Next, I randomized the brightness of the whole strip to add another dimension of flameyness. But when I tested this on the bottles, it looked fake -- all the bottles seemed to be flickering at the exact same time, which really wouldn't happen if there were actual candles in the bottles. How to make it look more natural? This is where the arrays come in.

I added three lines to the `on start` loop, setting the variables I made earlier (`strip2, strip3, strip4`) to each represent roughly 1/3 of the total strip. Then I was able to vary the brightness of 1/3 of the strip at a time by randomizing brightness to those arrays. This makes the whole animation look a lot more natural.

Had I wanted to be very thorough, I could have made an array for each of my 9 bottles, using just the number of lights in each bottle, then varied the brightness of each bottle individually. But because of the way the bottles are spaced pretty far apart and not sitting in a line, having 3 arrays was plenty for an illusion of randomness. If your bottles are all lined up on a shelf, you'll probably want separate arrays for each bottle so they don't flicker in "chunks."

This is my favorite mode, so I want it to be the default when the tree starts up. I added a line to my `on start` code setting my `autumn` variable to `true`. I also set `hue` to `0` to be sure I get a nice red color when the bottles start up.&nbsp;

### Winter / "Rain" Mode
![](https://cdn-learn.adafruit.com/assets/assets/000/088/015/medium800/led_strips_mc04_function_rain.jpg?1580772785)

For winter time, I wanted the feel of raindrops dripping from the tree, punctuated by the occasional flash of lightning. The top half of the code makes the raindrops, and the bottom half makes the lightning. The `clock` variable is used to count out the time between strikes.

This is based on the raindrop animation I wrote for the FloraBrella project, and [I go into more detail about that here](https://learn.adafruit.com/florabrella/code-with-makecode).

Using an `if/then` statement (found under **LOGIC** tab) makes this possible. In English, this code says something like:

If we haven't counted to some random number between 200 and 1000 yet, fix the photon bug and then turn on a white raindrop somewhere, while turning off some other raindrops. Then count up.

Once we've counted to our random number, flash all the pixels three times for a short randomized amount of time, then turn them all off and set our counter back to 0.

It's easy to make the lightning more or less frequent by adjusting the values. This code looks really cool, and is also my favorite mode. (Yes, I'm allowed to have two favorites!)

### Summer / Rainbow Mode

Summertime is lazy, so I kept this one simple and just used one of MakeCode's canned animations. This was so simple that I didn't bother to make a function for it, I just call it in the **FOREVER** loop, which we will get to shortly.

### Off / "Sleep" Mode
![](https://cdn-learn.adafruit.com/assets/assets/000/088/016/medium800/led_strips_mc06_function_off.jpg?1580773357)

Finally, our "sleep" mode fixes the photon bug, then turns all the LEDs to black / off, and stops any animations.

### Calling the Functions
![](https://cdn-learn.adafruit.com/assets/assets/000/088/018/medium800/led_strips_mc08_forever.jpg?1580773670)

To make the animations play, we'll use an `if/then` statement inside our **FOREVER** loop. For summer, I used the canned rainbow animation (using `show frame of animation` gives you a bit more control over speed and seems to curtail bugs), and for each of the other modes I called the function written for that season. Using the functions makes the code so simple!&nbsp;

## Inputs

Lastly, we need to hook up the Circuit Playground Express' capacitive touch pads to trigger the different modes.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/088/019/medium800/led_strips_mc09_touchA2.jpg?1580773983)

I'm using **A2** for "off" mode. I grabbed `on button A click` from the **INPUT** tab and selected `touch A2`. First, I reset all the lights to off by calling the `off` function, so the previous mode doesn't bleed into the new mode. Then, I set all modes to `false` except the one I want active, which I set to `true`.

![](https://cdn-learn.adafruit.com/assets/assets/000/088/020/medium800/led_strips_mc09_touchAll.jpg?1580774136)

Finally, I copy/pasted this block a few times, setting each touch pad to trigger the desired season's animation.

I'm sure there's a fancier way to do this with math and less repetitive code, but this way makes intuitive sense to me and it works just fine.

Give your code a name (I called mine Fairy Bottles) and save it. Click the Download button and a file will download to your computer. Plug your Circuit Playground Express into your USB port and click the **reset** button. You should see all the lights on the face of your Circuit Playground Express turn green, and a drive will appear on your computer called **CPLAYBOOT**.&nbsp; If you see a drive called **CIRCUITPY** , press the **reset** button a second time to get to **CPLAYBOOT**.

Drag the downloaded file onto this drive to program the Circuit Playground Express.

Once you've got your lights hooked up, touch the pads and see the modes change!

If you're having trouble with the download process, head over to the [Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express/makecode) guide for some more detailed instructions and troubleshooting ideas.

# Four Seasons Fairy Bottle Lanterns

## Wiring

![](https://cdn-learn.adafruit.com/assets/assets/000/087/176/medium800/led_strips_tree_bottle_wiring_2c.jpg?1579551775)

The wiring is the hardest part of this project. There are a lot of connections to make, and a lot of places where things can go wrong. Test each connection as you go, and you'll minimize any headaches later on.

### Power Wires

Power that has to travel a long way down wires or through a lot of pixels can degrade with the resistance in the wires. In practice, this means the pixels at the end of a long run of wire will "brown out" -- they look dimmer than the pixels at the beginning. To avoid this, I've set up my wiring to run power directly to the bottles instead of following the data line, which must run in sequence through all the bottles.&nbsp;

Most bottles have a direct link to the power source. It's ok to daisy-chain one or two bottles, but you may need to add an additional ground wire between the final bottles in the chains if you find you've got a lot of flickering.

So, the power wires are set up in a "star-fish" or "home-run" configuration, where each bottle is on its own power line.

### Data Wires

NeoPixel data wires MUST flow from **IN** to **OUT** in one unbroken chain if you want to be able to animate all the bottles individually.&nbsp;

The data wire is attached to the CPX pin **A1** , then goes to **IN** on the first bottle. Another line attaches to the **OUT** pin at the end of the NeoPixel strip, and heads to the next bottle in line where it will attach to **IN**. Fairly simple, yes?

However, NeoPixel data does not like to travel long distances over wire either. The signal can begin to degrade if there is more than around 3-4 feet of wire between your bottles.&nbsp;

Some of my bottles were placed further than this, so my solution was to use a single pixel or a bit of NeoPixel strip as a "repeater" for those long wire runs. The pixel can be hidden among the branches (or can be covered with black tape, if it's not easy to hide) and this keeps your data clean and flowing.

In a couple of places, I added a whole NeoPixel strip along the top of the branches, which shines light up at the ceiling and provides more ambient light for the room. Solving the data-run problem this way really added another beautiful dimension to my final project.

### Connectors

Since most of the assembly needed to be done in place instead of on my soldering table, I found it really useful to use JST connectors and splitters to attach each bottle to the power / data grid. If something was flickering, or not lighting up, I could easily swap out the LED bottle for a different bottle. This helped tremendously with troubleshooting.&nbsp;

Using JST connectors means you'll be making more than twice as many solder connections, but I really recommend doing it this way - it will make your life much easier in the long run.

# Four Seasons Fairy Bottle Lanterns

## Circuit Playground Wiring

![](https://cdn-learn.adafruit.com/assets/assets/000/087/602/medium800/led_strips_cpx_wired.jpg?1580088708)

I've got three connectors soldered to my Circuit Playground:

1. A 2-pin male connector with white wire soldered to **A1.** This will connect to the **data IN** pin of the first bottle. The black wire is not used.
2. A 4-pin female connector soldered to **A4, A5, A6** and **A7**. These 4 wires will connect to the 4 metal "season" buttons, for changing modes.
3. A 2-pin female connector soldered to **A2** and **A3**. **A2** will connect to the moon-shaped button and will turn the bottles dark. The **A3** connector is not currently used in my project but could be hooked up to another mode button if desired. (Maybe a secret mode hooked up to a knot hole or mushroom!)

![](https://cdn-learn.adafruit.com/assets/assets/000/087/650/medium800/led_strips_cpx_power.jpeg?1580145471)

To power the Circuit Playground, we'll use the onboard JST connector. Create an adapter using a female JST battery connector soldered to a male 2-pin JST connector, for easy interfacing to the power system we'll build later on. Here's the whole thing in all its glory.

![](https://cdn-learn.adafruit.com/assets/assets/000/087/651/medium800/led_strips_cpx_wired_%281%29.jpeg?1580145611)

Lastly, I stuck some sticky-back velcro on the back of my Circuit Playground for mounting inside the tree.

![](https://cdn-learn.adafruit.com/assets/assets/000/087/605/medium800/led_strips_cpx_velcro.jpeg?1580089019)

# Four Seasons Fairy Bottle Lanterns

## Bottle Lights Wiring

Each bottle has a strip of Skinny NeoPixels or a strand of NeoPixel Dots inside. I used the dots in the larger bottles and the strips in the smaller ones, depending on what would fit easily through the neck of the bottle. I soldered connectors onto each bottle - a male connector for the **power** and **ground** wires and a female for data **IN** and data **OUT.&nbsp;** This way the bottles are interchangeable, so I can move them around and switch them out for troubleshooting or aesthetic reasons.

![](https://cdn-learn.adafruit.com/assets/assets/000/087/588/medium800/led_strips_fairybottles_strand.jpg?1580082270)

The same exact wiring applies if you're using dots:

![](https://cdn-learn.adafruit.com/assets/assets/000/087/589/medium800/led_strips_fairybottles_dots.jpg?1580082324)

Being 100% consistent with wiring all the bottles is essential to keep your sanity for this project, especially as you start adding more bottles. If even one bottle is wired up differently, you could easily fry the whole system, so be consistent!

I'll go through a step-by-step process for wiring up the strip. If you're using NeoPixel dots, the connections will be exactly the same but you'll be soldering to wires instead of pads.

Start by cutting your [1m, 4-strand ribbon cable](https://www.adafruit.com/product/3892) in half. This is just the right length to hang the bottles close to the tree. If you want lower hanging bottles, adjust the ribbon cable length accordingly -- you want the wire to reach up and over the branch so you can hide the connectors.

Cut your NeoPixel strip to length. I have about 12 pixels in every bottle, give or take. This is a great time to use up those leftover bits from other projects.

Solder one end of your 4-wire ribbon cable to the strip as shown. The fourth wire is soldered to the **data OUT** pad at the OUT end of the strip.

![led_strips_01_stripwiring.jpg](https://cdn-learn.adafruit.com/assets/assets/000/087/593/medium640/led_strips_01_stripwiring.jpg?1580084340)

![led_strips_02_strip_ends.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/087/594/medium640/led_strips_02_strip_ends.jpeg?1580084422)

Separate the wires at the other end of your ribbon cable and strip 1/4" of shielding off.&nbsp;

Slip your heat shrink connectors onto a male and female 2-pin JST connector. Connect the four wires as shown. Don't shrink the heat shrink down just yet -- just twist the wires securely together. We'll test before securing.

![led_strips_00_connectors.jpg](https://cdn-learn.adafruit.com/assets/assets/000/087/590/medium640/led_strips_00_connectors.jpg?1580083872)

![led_strips_03_solderjoints_(1).jpeg](https://cdn-learn.adafruit.com/assets/assets/000/087/592/medium640/led_strips_03_solderjoints_%281%29.jpeg?1580084302)

Note: These connectors were salvaged from the ends of a NeoPixel strip so they're nicely color coded in white and black. You may have connectors that have two black wires, making it a bit harder to tell which is which. If you have that kind, it's a good idea to slip a bit of colored heat shrink, or some colored electrical tape or other marker to one wire so you don't get mixed up and solder anything backwards. It doesn't matter which wire you mark as long as you're consistent on every single connector.

![](https://cdn-learn.adafruit.com/assets/assets/000/087/595/medium800/led_strips_04_test.jpeg?1580084780)

### Testing

Test each strip or strand before securing the heat shrink and sealing the ends of the NeoPixels. To test the strip:

1. Load the code from the previous page onto your Circuit Playground
2. Plug the strip's female (data) connector into your Circuit Playground's **A1** connector
3. Plug the strip's male (power) connector into a female connector with exposed / stripped ends
4. Attach alligator clips from the exposed female connector to Circuit Playground's **VBAT** and **G** pads, as shown
5. Make sure none of the un-shielded wire connections are touching each other!
6. Plug your Circuit Playground (with code loaded) into power with a USB cable or battery

If all is working, hooray! You can now slide the heat shrink connectors over your wire joints and use a heat gun to seal the connections. You can also fill the ends of the silicone tubing with hot glue to secure the solder joints to the pads. Now it's time to do the next bottle. Make one for each bottle you plan to hang.

This method does NOT test the **data OUT** connection from each strip, but as long as the solder joint looks good and the strip lights up, you know you're 90% good with all the wires soldered to the right places, and you can pretty much move on.&nbsp;

### Troubleshooting

If the strand does not light up, here are a few things to check:

1. Do you have the code correctly loaded onto the Circuit Playground? Try uploading it again and make sure you're calling **A1**. If you're still not sure, try loading a simple rainbow "test" animation.
2. Are any of the unshielded wires touching each other? They can cause a short if they touch.
3. Did you mix up the wires on the connectors? This is very easy to do! If the Circuit Playground crashes or resets itself you may have power and ground switched. If the board seems fine, but there's just no light, you may have soldered to the **OUT** end of the pixels instead of the **IN** end. Power can flow either way but data must flow from **IN** to **OUT**.

# Four Seasons Fairy Bottle Lanterns

## Tree Connectors Wiring

Now for the tricky part.&nbsp;

Hang your bottles with the light strands inside. I closed the top of each bottle with a cork, to help provide strain relief to the wires. Use the leather thong to tie the bottle securely to your support structure. Let the thong take the weight of the bottle, so it's not hanging by the wires, which could pull out or break.

Don't worry yet about wiring or power or anything, just put the bottles where you want them to go. Move them around until they are just right.&nbsp;

Thread the wires from the bottle up and around the thong so the connectors are hidden up above your structure.

![](https://cdn-learn.adafruit.com/assets/assets/000/087/652/medium800/led_strips_wiring_wound_around.jpeg?1580145716)

Once you're happy with the placement, sketch out a diagram for data flow. Remember, long wire runs between bottles will degrade your signal, so figure out the most efficient way to get from bottle to bottle without a whole bunch of wire showing.

For extra-long wire runs, where the bottles are spaced far apart, you'll need to add a NeoPixel or bit of NeoPixel strip as a "repeater." Otherwise, your more complex animations may flicker and fail.

Here is a diagram of my data flow. All the wiring is hidden behind branches except the run between bottle #7 and bottle #8, which I hid behind some leaves instead.

![](https://cdn-learn.adafruit.com/assets/assets/000/087/607/medium800/led_strips_data_diagram.jpg?1580090378)

Next, sketch out a diagram of your power flow. I connected each bottle to power directly instead of following the data flow, in order to avoid brown-outs near the end of the strip. If you have just a few bottles with only a few lights, this may not be necessary -- you could just run ribbon cable between each bottle. But I've got around 200 LEDs in total so wanted to be sure everything was adequately powered, even for bright-white "lightning flash" animations.

![](https://cdn-learn.adafruit.com/assets/assets/000/087/625/medium800/led_strips_power_wiring_diagram.jpg?1580093270)

This graphic shows my power and ground wires. Most bottles connect directly to power (or a power splitter). A few of the further out ones are chained from other bottles, but I don't have more than two bottles in any chain.

The other thing to note is the ground wire connection in the upper right corner. With the power flowing along different branches, I was getting a pretty serious flicker in the bottles all the way to the right. Adding a ground wire connection between the two furthest bottles got rid of the flicker.

![](https://cdn-learn.adafruit.com/assets/assets/000/087/656/medium800/led_strips_bottle_wiring.jpg?1580155494)

### Connecting Wires

It's easiest to test the system if you build all the connections for each bottle before moving on to the next bottle, rather than doing the whole power system and then the whole data system.&nbsp;

#### Power Connector Wires

Start at the wall with your power supply and work outwards from there.

I cut off the jack on my power supply, and soldered on a female connector. The red (power) wire in the power supply connects to the white wire on the connector (or if yours aren't color coded, the one on the left, as you look at the splitter from the top).&nbsp;

Power will ALWAYS be on the left for a female connector, or on the right (still the white wire) for a male connector. Write this down somewhere, or maybe tattoo it on your forehead. Get one single connector wrong and the whole system will short out.

![](https://cdn-learn.adafruit.com/assets/assets/000/087/655/medium800/led_strips_power_splitter.jpeg?1580154210)

In order to connect to the splitter, you need a **male** connector. Your bottles are expecting a **female** connector (remember, you used a **male** for the two power wires for every bottle, right?). So, all extension wires for your power system will go from **male** on one end to **female** on the other.&nbsp;

Adafruit sells [pre-made extension cables that are 1m long](https://www.adafruit.com/product/616) with a male-to-female connector! So if your bottles are 1 meter (or less) apart, you can save yourself some work by ordering a bunch of these. You could also chain them together for longer power runs. Or, you can be an overachiever like me and solder up your own cables that are the perfect length, to make wire-hiding easier later on.

Don't forget that you'll need power to your NeoPixel repeaters as well.

#### Data Connector Wires

I am using a male connector on the Circuit Playground's **A1** pin, so my extension wire will need a female connector. The white wire on the connector will always be data **IN** , and the black will always be data **OUT** , to match up with the connectors we soldered to the bottles.&nbsp;

**OUT** from one bottle becomes **IN** to the next bottle in the series, and so forth and so on.&nbsp;

The bottles' data lines are soldered to a **female** connector, so they are expecting a **male**. So the first extension wire will be **female** to **male**.

Every other extension wire for data will be **male** to **male** , with the data flowing **IN** one connector wire and **OUT** the other. Adafruit doesn't sell **male** to **male** extension cables so you'll need to solder up your own.

If you're finding all this complicated, well, I warned you.&nbsp;

### Putting it All Together

Work in sequence:

1. Wall power to splitter
2. Power to Circuit Playground
3. Data & Power to bottle #1
4. Data & Power to bottle #2
5. Data & Power to repeater (if needed)
6. Data & Power to bottle #3
7. Etc, until all bottles are finished

Order more connectors than you think you need! And have plenty of wire and wire connectors on hand.&nbsp;

# Four Seasons Fairy Bottle Lanterns

## Capacitive Touch Controller

![](https://cdn-learn.adafruit.com/assets/assets/000/088/113/medium800/led_strips_IMG_9336.jpeg?1580935075)

Our code has four different modes, one for each of the four seasons, plus a mode for "off". We've hooked up five capacitive touch pads on the Circuit Playground Express to trigger the different modes.&nbsp; We can leave it like this and mount the Circuit Playground on the outside of the tree, or we can get a little fancy and make a custom controller using metal buttons or copper tape, or really anything that conducts electricity. Check out this [fruit sequencer](https://learn.adafruit.com/circuitpython-fruitbox-sequencer-musically-delicious-step-pattern-generator) for inspiration!

Craft stores sell a lot of charms or jewelry findings that will often work well. Use a file to scrape off any top coating so you're touching bare metal, and solder a wire to the back of the charm.

I went one step further and made cast pewter "icons," embedding the end of a wire in the molten pewter before it set up. This connection is really solid and steady, so I really don't get any misfires and there's no chance of the solder connection failing.

The details are beyond the scope of this (already complicated enough) guide, but I'll go over the basics because it was a fun bit of silliness to create.

![](https://cdn-learn.adafruit.com/assets/assets/000/087/659/medium800/led_strips_polymer_clay.jpeg?1580156386)

First, I made some little icons out of polymer clay: a flower blossom for spring, a leaf for summer, an acorn for autumn, and a moon for "off".

![](https://cdn-learn.adafruit.com/assets/assets/000/087/660/medium800/led_strips_casting.jpeg?1580156976)

I pressed some kinetic sand in a metal tray and made an impression of each icon. Then I melted a pewter ingot in my crucible and poured some pewter into the impression. While the pewter was still molten, I inserted a wire (with the shielding removed) to connect to the Circuit Playground, and also a u-shaped bit of galvanized wire to use as an attachment point to the tree.

![](https://cdn-learn.adafruit.com/assets/assets/000/087/671/medium800/led_strips_shiny.jpeg?1580159827)

The kinetic sand is not great at capturing fine details, but since my icons were simple shapes that didn't matter too much. I polished them up with the sanding bit on my Dremel, and they came out shiny and lovely!

Some of them took a couple tries to get right. The nice thing about pewter is that it's pretty waste-free -- if you don't get it right, you can just melt it down and try again.

![](https://cdn-learn.adafruit.com/assets/assets/000/087/670/medium800/led_strips_buttons.jpg?1580159688)

I have a removable access hatch on my tree, so I mounted the buttons there. I drilled a small hole for the wire to poke through, and used the galvanized wire points and some E6000 glue to help secure the buttons to the bark.&nbsp;

I attached the four seasons buttons to a male 4-pin connector, and the moon pin to a 2-pin connector, for easy attaching to the Circuit Playground Express. Now I can change modes just by brushing my fingertips over one of the four season icons.&nbsp;

Sleeping under the tree is such a delight. This project was a lot of work, but the results are simply stunning and 100% worth the effort. There's a fairyland in my guest room. Who wants to come visit?

![](https://cdn-learn.adafruit.com/assets/assets/000/088/112/medium800/led_strips_fairybottles_leavesandsun.jpeg?1580934967)


## Featured Products

### 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 Mini Skinny NeoPixel Digital RGB LED Strip - 30 LED/m

[Adafruit Mini Skinny NeoPixel Digital RGB LED Strip - 30 LED/m](https://www.adafruit.com/product/2949)
So thin.&nbsp;So mini.&nbsp;So teeeeeeny-tiny. It's the 'skinny' version of our classic NeoPixel strips!

These NeoPixel strips have 30 digitally-addressable pixel Mini LEDs per meter and are very affordable and are...

In Stock
[Buy Now](https://www.adafruit.com/product/2949)
[Related Guides to the Product](https://learn.adafruit.com/products/2949/guides)
### In-line wire 1-to-4 splitter

[In-line wire 1-to-4 splitter](https://www.adafruit.com/product/402)
If you want to connect multiple EL wires/strips/panels up to one inverter, these splitters are quite useful. There is one male connector (goes to the inverter) and then 4 female connectors (which will connect to each wire/strip/panel. You can even cascade them! Only thing to watch for is make...

In Stock
[Buy Now](https://www.adafruit.com/product/402)
[Related Guides to the Product](https://learn.adafruit.com/products/402/guides)
### 2-pin JST SM Plug + Receptacle Cable Set

[2-pin JST SM Plug + Receptacle Cable Set](https://www.adafruit.com/product/2880)
These 2-wire cables&nbsp;are 16cm long and come as a set. &nbsp;One side has a 2-pin JST SM type connector plug on the end. &nbsp;The other side has a matching 2-pin JST SM type receptacle connector. &nbsp;They are good for whenever you have 2 wires you want to be able to plug and unplug....

In Stock
[Buy Now](https://www.adafruit.com/product/2880)
[Related Guides to the Product](https://learn.adafruit.com/products/2880/guides)
### 4-pin JST SM Plug + Receptacle Cable Set

[4-pin JST SM Plug + Receptacle Cable Set](https://www.adafruit.com/product/578)
These 4-wire cables are 15cm long and come as a set, one side has a JST SM type connector plug on the end. The other side has a matching JST SM type receptacle connector. They are good for whenever you have 4 wires you want to be able to plug and unplug. We like the solid and compact nature of...

In Stock
[Buy Now](https://www.adafruit.com/product/578)
[Related Guides to the Product](https://learn.adafruit.com/products/578/guides)
### Silicone Cover Stranded-Core Ribbon Cable - 4 Wires 1 Meter Long

[Silicone Cover Stranded-Core Ribbon Cable - 4 Wires 1 Meter Long](https://www.adafruit.com/product/3892)
For those who are fans of our silicone-covered wires, but are always looking to _up their wiring game_. We now have **Silicone Cover Ribbon cables!** These may look _a lot_ like <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/3892)
[Related Guides to the Product](https://learn.adafruit.com/products/3892/guides)
### In-line power cable 1 meter long extension cord (for EL wire)

[In-line power cable 1 meter long extension cord (for EL wire)](https://www.adafruit.com/product/616)
Give yourself some more room with an EL wire cable extender. This cable has a 2-pin JST SM plug on one end and receptacle on the other. Use it to extend the reach of EL wire, panel, tape, etc. The cable is a meter long, you can of course snap more together if necessary, or cut and re-solder it...

Out of Stock
[Buy Now](https://www.adafruit.com/product/616)
[Related Guides to the Product](https://learn.adafruit.com/products/616/guides)
### Silicone Cover Stranded-Core Wire - 26AWG in Various Colors

[Silicone Cover Stranded-Core Wire - 26AWG in Various Colors](https://www.adafruit.com/product/1970)
Silicone-sheathing wire is super-flexible and soft, and it's also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps out. We like this wire for being extremely supple and flexible, so it is great for wearables or projects where the wire-harness...

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

## Related Guides

- [Adafruit Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express.md)
- [LED Shoji Lamp](https://learn.adafruit.com/led-shoji-lamp.md)
- [Desktop Dumpster Fire](https://learn.adafruit.com/desktop-dumpster-fire.md)
- [ Memory-saving tips for CircuitPython](https://learn.adafruit.com/memory-saving-tips-for-circuitpython.md)
- [Easy Sparkle Pocket T-Shirt](https://learn.adafruit.com/easy-sparkle-pocket-t-shirt.md)
- [Xenomorph Halloween Candy Bucket](https://learn.adafruit.com/xenomorph-halloween-candy-bucket.md)
- [3D Print Ratcatcher 2 Controller Device](https://learn.adafruit.com/3d-print-ratcatcher-2-controller-device-wand.md)
- [Circuit Playground Musical Glove](https://learn.adafruit.com/cpx-musical-glove.md)
- [HalloWing Light Paintstick](https://learn.adafruit.com/hallowing-light-paintstick.md)
- [Circuit Playground Analog Input](https://learn.adafruit.com/circuit-playground-analog-input.md)
- [Paper-Craft Crystal Gem Lantern](https://learn.adafruit.com/paper-craft-crystal-gem-lantern.md)
- [Automation with Crickit and Capsela](https://learn.adafruit.com/automation-with-crickit-and-capsela.md)
- [Simon Game Clone with Circuit Playground Express and CircuitPython](https://learn.adafruit.com/simon-game-clone-with-circuitplayground-express-and-circuitpython.md)
- [How to Use Video Greenscreen in MakeCode](https://learn.adafruit.com/how-to-use-video-greenscreen-in-makecode.md)
- [Sparky the Blue Smoke Monster Automaton](https://learn.adafruit.com/sparky-automaton.md)
- [Circuit Playground Express TV Zapper](https://learn.adafruit.com/circuitpython-tv-zapper-with-circuit-playground-express.md)
