# Fiber Optic Pixie Skirt

## Overview

https://youtu.be/BYwZ1RZHqEQ

Feel the magic of fiber optics! &nbsp;This guide will lead you through adding fiber optic ruffles to a skirt or dress, and then change lighting modes with a twirl or twitch of your hips. &nbsp;

You can use an existing dress and add your own ruffles, or make one from whole cloth -- your imagination is the limit. &nbsp;With a little sewing, a few 3d printed parts and a Flora, you will absolutely light up any room you walk into. &nbsp;

This technique is perfect for embellishing a prom or wedding dress, or for more advanced sewers, creating a gorgeous ball gown worthy of a fairy princess or snow queen.

Fiber optics are a great choice for a dress to dance in. &nbsp;They're sturdy and washable, and really versatile. &nbsp;The fibers hold their shape when gently heated, creating a delightful swirl of light, and they can be lit up in whatever color strikes your fancy, even animated with light patterns, unlike EL wire which is a bit more delicate and can only show one color. &nbsp;

Side glow fiber optics aren't as bright as EL wire when used with most addressable LEDs, but [these 3W Pixies are screaming bright](https://www.adafruit.com/products/2741)! They easily&nbsp;rival EL wire for brightness... without the squeaky high pitched whine of an EL converter. &nbsp;Move over, EL wire! Pixie's in town!

![](https://cdn-learn.adafruit.com/assets/assets/000/028/737/medium800/leds_fiber_dress.jpg?1448497164)

### Materials

- [Flora](https://www.adafruit.com/products/659)
- [LSM303 accelerometer & compass sensor](https://www.adafruit.com/products/1247)
- [Pixie 3 Watt LEDs -- I used 5 of these in my skirt](https://www.adafruit.com/products/2741)
- [2500mAh LiPoly Battery](https://www.adafruit.com/products/328)
- [Tactile on/off switch](https://www.adafruit.com/products/1092)
- [Side glow fiber optics](http://www.wiedamark.com/fiberopticsideglow.aspx)&nbsp;-- I used 84 strands
- 10-20 yards of organza fabric
- 26awg and 30awg silicone stranded wire

### Tools

- Soldering iron & accessories
- 3d printer (optional)
- Sewing machine or serger with a&nbsp;[cording presser&nbsp;foot](http://www.sewinginsight.com/presser-feet-guide/)
- Heat gun
- E6000 glue

![](https://cdn-learn.adafruit.com/assets/assets/000/028/810/medium800/leds_erin_snowfairy_led.jpg?1448839511)

# Fiber Optic Pixie Skirt

## Code

If this is your first time using Flora, check out the[Flora setup guide](../../../../getting-started-with-flora/download-software)to get up and running.

You'll need to install a couple libraries to get this code working.

First, open the Arduino library manager:

![](https://cdn-learn.adafruit.com/assets/assets/000/083/194/medium800/leds_library_manager_menu.png?1572355442)

Search for&nbsp; **Adafruit Sensor&nbsp;** library and install it

![](https://cdn-learn.adafruit.com/assets/assets/000/083/196/medium800/leds_sensors_adafruitsensor.png?1572355653)

Search for&nbsp; **Adafruit Pixie** library and install it

![](https://cdn-learn.adafruit.com/assets/assets/000/083/195/medium800/leds_pixie.png?1572355560)

Search for&nbsp; **Adafruit LSM303DLHC&nbsp;** library and install it

![](https://cdn-learn.adafruit.com/assets/assets/000/083/197/medium800/leds_lsm303dlhc_%281%29.png?1572355690)

There is a [great tutorial on how to install Arduino libraries](http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use)&nbsp;in case you haven't done this before. **It’s even simpler if using Arduino version 1.6.5** or newer…from the “Sketch” menu, select&nbsp;“Include Library→Manage Libraries…” and use the install option for each of these. Done!

Then copy and paste the code below into your&nbsp;[Arduino IDE.](../../../../adafruit-arduino-ide-setup/arduino-1-dot-6-x-ide)

Plug your Flora in with a USB cable. &nbsp;Select Flora from your list of boards under the Tools menu, and choose your USB port under the Ports menu. &nbsp;Press upload.

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

# Fiber Optic Pixie Skirt

## Lights Assembly

![](https://cdn-learn.adafruit.com/assets/assets/000/028/739/medium800/leds_fiber-dress-wiring-diagram.jpg?1448498152)

Solder your Pixie LEDs together as shown in the [Pixie Guide](../../../../pixie-3-watt-smart-chainable-led-pixels/assembly), leaving around 2&nbsp;feet of wire between each pixel. &nbsp;Since we've got a smaller power source and only a few Pixies, I used 26awg wire for the power and ground lines, and 30awg wire for the data line.

Soldering these pixies together with stranded wire can be a little tricky! &nbsp;The soldering holes are very, very close together and it's really easy to get a short from one hole to the next. &nbsp;I found it easiest to solder the power and ground wires back-to-front, and then the data wire front-to-back, to avoid any chance of having stray strands touching.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/028/730/medium800/leds_adafruit_products_pixies.jpg?1448488883)

Next, solder the Flora and LSM303 together as shown in the [Sparkle Skirt tutorial](../../../../sparkle-skirt/sew-circuit). &nbsp;The wiring is exactly the same, only we'll be using wires instead of conductive thread, and leaving a bit more space (around 8 inches of wire) between.&nbsp;

- LSM303 G --\> Flora G
- LSM303 SDA --\> Flora SDA
- LSM303 SCL --\> Flora SCL
- LSM303 3v --\> Flora 3.3v

&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/028/731/medium800/leds_flora_sparkle-skirt-08.jpg?1448489320)

Lastly, connect the Flora to the Pixies:

- Pixies -&nbsp;&nbsp;--\> Flora G
- Pixies + &nbsp;--\> Flora VBATT
- Pixies IN --\> Flora 6

![](https://cdn-learn.adafruit.com/assets/assets/000/028/732/medium800/leds_flora_wired.jpg?1448489666)

Spend a few minutes preparing for strain relief using zip ties to keep any of the wires from taking all the stress of movement. &nbsp;You'll sew these components into the dress later on.

If you haven't uploaded your code to the Flora yet, now is a great time to do that. &nbsp;Plug your battery into the Flora and wiggle the sensor around, and make sure all your Pixies light up and change colors.

![](https://cdn-learn.adafruit.com/assets/assets/000/028/733/medium800/leds_set_up_switch.jpg?1448489982)

Add an on/off switch to your battery as shown in the&nbsp;[Neopixel Glow Fur Scarf Tutorial.](../../../../animated-neopixel-gemma-glow-fur-scarf/prepare-the-battery)&nbsp;

Adding an on/off switch to the battery is optional, since the Flora has an onboard switch you can use, but it's worth your time! &nbsp;This is a complicated costume, and searching for a teensy switch among all those ruffles can be tricky.

# Fiber Optic Pixie Skirt

## Make the Ruffles

### Measurements

Your measurements will depend on the effect you're going for. &nbsp;I wanted vertical ruffles, and I wanted them about 5" wide, so that was where I started. &nbsp;

For vertical ruffles, measure the length of your skirt from waist to floor. &nbsp;If you want them horizontal or diagonal, measure that distance. &nbsp;Write this number down.

Your fiber optic fibers should be about 2-3x this length. &nbsp;For my&nbsp;skirt, I used about 7 feet of fiber. &nbsp;

When you order the fibers, be sure to order an extra foot or two in length over what you think you'll need -- you can always trim the fibers down but you can't make them any longer!&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/028/706/medium800/leds_pattern2-1.jpg?1448471000)

### Fabric Cutting

The pattern for the ruffles is basically a doughut shape with a slash through one side. &nbsp;The inner edge&nbsp;(the doughnut hole) is the part that will get sewn to your dress. &nbsp;The outer edge will have the fibers sewn into it. &nbsp;

Create a half circle pattern out of some scrap fabric using the measurements shown. &nbsp;Remember, this is just half the circle -- you're cutting on the fold, so when you unfold the fabric you'll have complete circles.

Fold your ruffle fabric so you can cut multiple ruffles all at once. &nbsp;A good way to do this is to wrap your fabric around a piece of cardboard that's about the same radius as your doughnut, then slip the cardboard out and voila! &nbsp;Perfectly aligned folds. &nbsp;Pin the pattern to the pile of fabric and cut. &nbsp;

Cut along one of the folded edges to make an open circle, and then tidy up the edges to get rid of any corners.

![](https://cdn-learn.adafruit.com/assets/assets/000/028/708/medium800/leds_pattern_finished.jpg?1448471982)

If your fabric wants to ravel, finish the inner edge of each ruffle with a zigzag stitch or a serger.

### Preparing&nbsp;the Fiber

Slice the plastic tube and pull the fibers out. &nbsp;This is much easier said than done, but a thread ripper and an extra pair of hands will get you there.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/028/710/medium800/leds_fibers_out.jpg?1448472380)

Decide how many fibers you want to put in each ruffle. &nbsp;I wanted maximum brightness, so each of my ruffles has 3 fibers sewn into it. &nbsp;This is the most that would fit into my cording presser foot's hole, so that made it easy to decide.

Try passing two or three fibers through your machine's presser foot to see what your options are. &nbsp;

Since I used 3 fibers in each ruffle, I separated out 3 fibers from the bundle.

![](https://cdn-learn.adafruit.com/assets/assets/000/028/713/medium800/leds_tube_roll.jpg?1448472637)

Next, we want to add curl to the fibers.&nbsp;

Find a mailing tube or paper towel roll, or something else heat-resistant with a pleasing diameter. &nbsp;Wrap your 3 fibers around in a spiral pattern, making sure they don't cross each other. &nbsp;

Gently heat the whole tube with a heat gun. &nbsp;You'll see the fibers react and crinkle up a bit when they get hot. &nbsp;Be careful not to heat them so much that they melt or break, but get them nice and evenly hot. &nbsp;Let them cool COMPLETELY before you remove them from the tube, and they'll hold their delightfully bouncy spiral shape.

Note: You may find yourself wanting to try this with all 84 fibers at once instead of just 3 fibers at a time. &nbsp;It seems like a good idea, but it isn't. &nbsp;If the fibers get too hot and fuse together, they'll break when you try to pull them apart, and there's no fixing that! &nbsp;So be patient.

![](https://cdn-learn.adafruit.com/assets/assets/000/028/715/medium800/leds_presser_foot.jpg?1448473067)

Take your 3 fibers and thread them through the hole in your cording presser foot. &nbsp;

Set your machine to a loose zigzag stitch (or whatever is recommended in your manual). &nbsp;Be sure to make the stitch length fairly long. &nbsp;A very short stitch length will cover up the fibers and not let the light come through. &nbsp;You want enough stitches-per-inch to secure the fiber but not so many that the light gets blocked by too much thread. &nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/028/716/medium800/leds_sewing_fibers.jpg?1448473308)

Make sure you have 5-6 inches of fiber pulled through the presser foot, so you have some "lead" for attaching the lights. Stitch&nbsp;along the outer edge of your ruffles, pulling gently on the fibers as you sew. &nbsp; Your fibers will end up encased in a zigzag thread "tunnel".

![](https://cdn-learn.adafruit.com/assets/assets/000/028/717/medium800/leds_single_ruffle.jpg?1448473538)

Repeat with each ruffle. &nbsp;

I have 30 ruffles on my skirt. &nbsp;This may get a little tedious. &nbsp;You may want a good audiobook for this portion. &nbsp;I recommend [Name of The Wind](http://www.patrickrothfuss.com/content/books.asp)&nbsp;by Pat Rothfuss. &nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/028/718/medium800/leds_pin_to_skirt.jpg?1448473786)

Stretch the ruffles out with the extra loose fiber at the top, and pin them to your dress, spacing them artfully.&nbsp;

Once all the ruffles are done and pinned, sew them in place.

![](https://cdn-learn.adafruit.com/assets/assets/000/028/719/medium800/leds_snow_fairy.jpg?1448474004)

# Fiber Optic Pixie Skirt

## Light the Fibers

The trick to fiber optics is getting them aligned as nicely as possible above the LED, for maximum brightness. &nbsp;

This 3d printed cover fits right over the Pixie LED and holds up to 20 fibers in place right above the light. &nbsp;If you're using 3 fibers per ruffle, that works out to 6-7 ruffles per light.

I found that printing in black filament seemed to work well -- the Pixies are so bright that they blow right through a lighter color of filament and wash out the fiber optic lighting.

[Download Pixie Cover .stl file](http://www.thingiverse.com/thing:1152045)
If you don't have a 3d printer, you can [order them from shapeways](http://shpws.me/KSHg).&nbsp;

Print them with a nice high resolution, with minimal supports. &nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/028/725/medium800/leds_shapeways_fiber_pixie_cover.jpg?1448487610)

Poke a hole at the top of each ruffle and slip all the fiber leads through to the inside of the dress.

You'll be hooking up multiple ruffles to each Pixie LED. &nbsp;I had 30 ruffles and 5 Pixies: 30/5 = 6. That means 6 ruffles, containing 3 strands each (18 fibers) per Pixie.

I wanted the different colors dispersed semi-randomly throughout the skirt, instead of having solid color block sections, which made the organization of the fibers a little bit complicated. &nbsp;I wanted to keep all 18 fibers going to each light in the same general area of the skirt (to avoid lots of fiber leads wrapping around my waist) but didn't want them all next-door to each other.

I used colored pins to mark out which fibers should go to which light, and gathered all the fibers together and secured them with a small rubber band. &nbsp;&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/028/726/medium800/leds_fiber_organization.jpg?1448487618)

Warning: 

Be careful to leave the zipper opening or closure on your dress free! &nbsp;You don't want to fiber yourself into the dress permanently. &nbsp;(At least, I assume you don't)

![](https://cdn-learn.adafruit.com/assets/assets/000/028/727/medium800/leds_fibers_gather.jpg?1448487789)

Slide all the fibers through the top of your Pixie cover. &nbsp;Make sure you have enough play that nothing's pulling too hard on anything else. &nbsp;Clip all the fibers at once so they're exactly perfectly the same length.

![](https://cdn-learn.adafruit.com/assets/assets/000/028/728/medium800/leds_fibers_even.jpg?1448487858)

Slip the fibers through the case until they're just at the bottom of the fiber tube. &nbsp;Place a Pixie LED in there temporarily, and press the fibers down so they're touching the top of the LED. &nbsp;Make sure all the fibers light up.

On the outside of the case (at the top where the fibers go in), coat the whole assembly liberally with E6000 glue. &nbsp;Don't use hot glue or crazy glue here -- hot glue could melt the fibers, and crazy glue will make them disintigrate, stop carrying light, and break. &nbsp;(Ask Me How I Know)

Once you have all your fibers managed and glued, and the glue has dried completely, sew each Pixie LED into its case using the mounting holes on each side. &nbsp;Watch it GLOW!

![](https://cdn-learn.adafruit.com/assets/assets/000/028/804/medium800/leds_IMG_5170.jpg?1448728099)

# Fiber Optic Pixie Skirt

## Finishing

Now it's time to secure the electronic components to your skirt and test it out.

If your skirt isn't lined, you may want to add a lining to protect your wires and fibers and make the whole thing a lot more comfortable.

Find a safe&nbsp;place near the waistband&nbsp;to sew down the LSM303 accelerometer. &nbsp;Don't choose any place that will get sweaty or you'll short your dress out. &nbsp;Between the skirt and lining is a great way to go. &nbsp;Orient the sensor so the arrows indicating "X" are parallel to the ground. &nbsp;Sew it down with the unused pads.

![](https://cdn-learn.adafruit.com/assets/assets/000/028/735/medium800/leds_wiring_showdown.jpg?1448496964)

It's also a great idea to add a little pocket for the battery, so it doesn't pull too much on the electronic components.

Once everything is secure, spend some more time on strain relief. &nbsp;Tack down the wires so nothing pulls, and make sure everything is comfortable.

Put your skirt on and twirl around a bunch!

There are a few lines in the code you can change in order to change the sensitivity of the sensor. &nbsp;

```auto
const float twirl = 7; // accelerometer threshold for toggling modes -- change this number to change sensitivity
long twirlStart = 0;
long twirlTime = 2000;
```

The "const float twirl" variable will adjust the sensitivity. &nbsp;Whole numbers or decimals are OK here. &nbsp;Change this number until you find a sensitivity that works for you.

The "twirlTime" variable sets the duration of time between&nbsp;sensor checks. &nbsp;It's set to 2000 (2 seconds). &nbsp;If you find the modes double-changing before you're done with your twirl, play with this number until you find one that works for you.

![](https://cdn-learn.adafruit.com/assets/assets/000/028/736/medium800/leds_erin_snowfairy_led.jpg?1448497075)


## Related Guides

- [Sewable NeoPixels](https://learn.adafruit.com/flora-rgb-smart-pixels.md)
- [LED NeoPixel Corset with Circuit Playground Express and MakeCode](https://learn.adafruit.com/led-corset-with-circuit-playground-and-makecode.md)
- [Glowing Fascinator Hat with Gemma M0 and MakeCode](https://learn.adafruit.com/glowing-fascinator-hat-gemma-m0-makecode.md)
- [Pathfinder Robot Companion](https://learn.adafruit.com/pathfinder.md)
- [USB Host to BLE Keyboard Adapter](https://learn.adafruit.com/esp32-s3-usb-to-ble-keyboard-adapter.md)
- [Epoxy Resin Torch Lamp with Touch Control & 3D Printed Base](https://learn.adafruit.com/epoxy-resin-torch-lamp-with-touch-control-3d-printed-base.md)
- [LED Harness Bra](https://learn.adafruit.com/neopixel-led-harness-bra.md)
- [USB MIDI Host Messenger](https://learn.adafruit.com/usb-midi-host-messenger.md)
- [Minecraft GPS Compass](https://learn.adafruit.com/minecraft-gps-compass.md)
- [Unicorn Hat with Moving Ears](https://learn.adafruit.com/unicorn-hat-with-moving-ears.md)
- [Bubble Table with LED Animations and IR Remote Control](https://learn.adafruit.com/bubble-table-with-led-animations-and-ir-remote-control.md)
- [Burning Fire Wizard Staff](https://learn.adafruit.com/burning-fire-wizard-staff.md)
- [MP3 Playback in CircuitPython with Lars the Sloth Puppet](https://learn.adafruit.com/mp3-circuitpython-lars.md)
- [Make It Shake, Rattle, and Roll: Accelerometer Use](https://learn.adafruit.com/make-it-shake-rattle-and-roll.md)
- [Getting Started with Microsoft Azure and CircuitPython](https://learn.adafruit.com/getting-started-with-microsoft-azure-and-circuitpython.md)
- [Wireless NeoPixel Controller](https://learn.adafruit.com/neotrellis-neopixel-controller.md)
