# Glowing WhoVille Hat

## Introduction

![](https://cdn-learn.adafruit.com/assets/assets/000/037/777/medium800/led_strips_hat_rainbow.jpg?1480962133)

Every good elf needs&nbsp;a hat on his shelf.   
Or better that said: a hat on his head!   
  
A long curly&nbsp;top with a ball at the end,   
It covers his mop and it shows he's a friend  
  
To all other elves (and to people of height).  
But more than just that - this hat is alight!   
  
With colors that swirl, shine, shimmer and glow..   
A fashion "must have" for those in the know!

![](https://cdn-learn.adafruit.com/assets/assets/000/037/688/medium800/led_strips_elfhat_two.jpg?1480788182)

## Before you Start

Every Who is unique, and that is what makes them so wonderful. &nbsp;What kind of hat does your inner Who wear? Make a [Pinterest board of ideas](https://www.pinterest.com/firepixie/fantasy-fosshape-hats/), and use this&nbsp;pattern as a starting point to design&nbsp;and realize the silliest Who-hat of your Christmas dreams.

This is a great&nbsp;beginner project -- the soldering is&nbsp;fairly simple, and the Flora is really easy to work with. &nbsp;The magic is in your creativity and design. &nbsp;Fosshape is wonderful stuff with nearly infinite possibility\*. &nbsp;Let your imagination run wild!

\*And, maybe get twice as much Fosshape as you think you'll need. &nbsp;The second hat you make may be more than twice as good as your first attempt. &nbsp;And then you'll have one for a friend!

## Materials

- 1-2 meters of [white 30/m Neopixel Strip](https://www.adafruit.com/product/1376)
- [Flora](https://www.adafruit.com/product/659)
- [JST 2-pin on/off switch](https://www.adafruit.com/product/3064)
- [Lithium Polymer 1200mAh battery](https://www.adafruit.com/product/258) + [charger](https://www.adafruit.com/product/1304) (or a [3xAAA battery pack](https://www.adafruit.com/products/727) if Lithium Polymer batteries make you nervous)
- Flexible silicone 26awg wire in 3-4 colors
- [3/4"&nbsp;clear heatshrink tubing](https://www.amazon.com/Polyolefin-Clear-Heat-Shrink-Section/dp/B004RPU6XA/ref=sr_1_1?ie=UTF8&qid=1480789407&sr=8-1&keywords=3%2F4+clear+heat+shrink)
- 1-2 yards of [Fosshape](https://www.amazon.com/2-Yard-Bolt-FOSSHAPE%C2%AE-300/dp/B00VRW9OIE/ref=sr_1_3?ie=UTF8&qid=1480787282&sr=8-3&keywords=fosshape)
- Clear plastic Christmas Tree ball ornament with at least 1/2 diameter opening (I found this at Michael's)
- Fiberfill stuffing

## Tools

- [Clothing steamer](https://www.amazon.com/Conair-ExtremeSteam-GS23-Fabric-Steamer/dp/B006CR9KGA/ref=sr_1_9?s=home-garden&ie=UTF8&qid=1480788817&sr=1-9&keywords=steamer) or Heat Gun
- Soldering iron & accessories
- Sewing machine
- [Large Styrofoam Wig Head](https://www.amazon.com/Mannequin-White-Styrofoam-foam-head/dp/B00214AMTW/ref=sr_1_3_s_it?s=beauty&ie=UTF8&qid=1480788783&sr=1-3&keywords=large+wig+head)

![](https://cdn-learn.adafruit.com/assets/assets/000/037/689/medium800/led_strips_40_finished.jpg?1480788723)

# Glowing WhoVille Hat

## Make the Hat

![](https://cdn-learn.adafruit.com/assets/assets/000/037/690/medium800/led_strips_18_hatfinished.jpg?1480788968)

FOSSHAPE is a unique nonwoven fabric, comprised of a low melt synthetic polyester fiber that when exposed to varying degrees of heat (200 degree F range) and pressure it changes in stiffness and texture. &nbsp;

This means you can sculpt whatever shape you desire, hit it with a heat gun or steamer, and it will stay that way. &nbsp;Just Like Magic.

If you've never worked with fosshape before, start by cutting a few small scraps and play around with them. &nbsp;This material can shrink up to 1/3 of its size as it stiffens, so it's a great idea to make something small and get a feel for how much heat is needed, and how much shrinkage wants to happen, before diving into a larger project. &nbsp;

It's always easy&nbsp;to make the Fosshape stiffer with more heat, but if you overheat it there's no going back to soft-and-flexible. &nbsp;So do some experimenting first and save yourself some possible future heartache!

Much more information can be found in the [Wonderflex site's FAQ.](http://www.wonderflexworld.com/fosshape-frequently-asked-questions/)

![](https://cdn-learn.adafruit.com/assets/assets/000/037/660/medium800/led_strips_01_pattern_3.jpg?1480710135)

## Cutting
Adjust the sizes as desired. &nbsp;This pattern doesn't need to be exact -- different proportions will make your hat your own, so play with the pattern to get the hat you want.

Sketch&nbsp;out the pattern at full size on a piece of butcher paper or wrapping paper and cut it out.

Fold your Fosshape in half so you have two layers and pin your pattern to the Fosshape. &nbsp;Be sure the top edge of the front piece is on the fold, so you'll end up with one double-long piece when it's cut.

Cut out two of the main hat pattern pieces, and two of the front pieces on the fold.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/659/medium800/led_strips_02_pattern_cut.jpg?1480709152)

## Sewing
For the HAT pieces, stitch the top and bottom edge together between the circles.

&nbsp;

For the FRONT piece, stitch the pointy edges together. &nbsp;Trim all seams close to stitching and grade out extra fabric at the point.

&nbsp;

Turn both pieces right-side out.

![led_strips_03_hat_sewn.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/661/medium640/led_strips_03_hat_sewn.jpg?1480710566)

![led_strips_04_hat_front_sewn.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/662/medium640/led_strips_04_hat_front_sewn.jpg?1480710580)

![led_strips_05_grade_point.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/663/medium640/led_strips_05_grade_point.jpg?1480710591)

Pin one of the rough edges of the FRONT piece to the front edge of the HAT piece, matching centers. &nbsp;Stitch.

&nbsp;

Fold the facing piece over the seam and pin it in place. &nbsp; **Don't stitch this yet!** &nbsp;We're leaving it open so we can get the lights inside.

![led_strips_06_hat_seam.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/664/medium640/led_strips_06_hat_seam.jpg?1480710898)

![led_strips_07_pin_facing.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/665/medium640/led_strips_07_pin_facing.jpg?1480710909)

## Add Pockets
At the front of the hat, cut along the cut lines and fold along the fold lines.

&nbsp;

Stitch as shown, leaving &nbsp;1.5" opening for wires (be sure the Flora fits through) and leaving the top edge open as a pocket.&nbsp;

![led_strips_16_foldline.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/666/medium640/led_strips_16_foldline.jpg?1480711053)

![led_strips_pocket.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/667/medium640/led_strips_pocket.jpg?1480711092)

## Heating & Setting
Place your hat on your wig head and pin it down. &nbsp;(Don't worry, it won't hurt her)

&nbsp;

Begin to shape your hat by making pleats along the top seam. &nbsp;Play with the number and depth of the pleats until you get the shape you want.

&nbsp;

If needed, temporarily stuff some fiberfill or extra fabric inside to help the hat hold its shape during heating.

![led_strips_08_wighead.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/668/medium640/led_strips_08_wighead.jpg?1480711209)

![led_strips_10_pleats.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/669/medium640/led_strips_10_pleats.jpg?1480711247)

![led_strips_12_stuff.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/670/medium640/led_strips_12_stuff.jpg?1480711298)

Once you have your desired shape, pin down any side pleats or areas that might shift.

&nbsp;

With a clothing steamer or heat gun, heat the fabric. &nbsp;Only heat the areas you want to get stiff. &nbsp;Stay away from the dangly wings in front. &nbsp; **Go easy here** -- you can always make it stiffer but once you lose the softness it's gone forever.

![led_strips_13_pin_sides.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/671/medium640/led_strips_13_pin_sides.jpg?1480711349)

![led_strips_14_steam.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/672/medium640/led_strips_14_steam.jpg?1480711390)

Remove all the pins except those holding the front facing in place. &nbsp;Try your hat on and bounce around a bit, and make any needed adjustments.

Once you're happy with the fit, get out your measuring tape and measure the front edge and the tail from the crown of your head to the tip. &nbsp;This measurement will tell you exactly how many LEDs to use in each spot.

Add a few more inches to the tail&nbsp;measurement to allow for 4-5 LEDs poking through into the dangling ball.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/673/medium800/led_strips_19_measure.jpg?1480711699)

# Glowing WhoVille Hat

## Wiring Diagram

![](https://cdn-learn.adafruit.com/assets/assets/000/037/674/medium800/led_strips_elfhat_wiring2.jpg?1480713035)

We'll be using two separate strands of neopixels: one in the front and one in the tail and ball.

The two pockets you made in the front of the hat will hold the flora (on the left) and the battery and power switch (on the right).

The battery & switch will connect to the OUT end of the front strand and the IN end of the tail strand, to minimize long wire runs. _(This is a possibility&nbsp;folks sometimes overlook with NeoPixels: while data MUST travel&nbsp;in a specific direction, "in" to "out," power doesn’t care and can be applied&nbsp;at either end.)_

![](https://cdn-learn.adafruit.com/assets/assets/000/037/675/medium800/led_strips_hat_layout.jpg?1480713896)

# Glowing WhoVille Hat

## 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&nbsp;the FastLED library to get this code working.

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 FastLED. Done!

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

**Update the first few lines in the code** with the number of LEDs you actually have in your hat.

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.

```auto
#include &lt;FastLED.h&gt;

#define LED_PIN     12
#define TAIL_PIN    6
#define NUM_LEDS    20       //Number of LEDs in the front
#define NUM_TAIL    15       //Number of LEDs in the tail
#define NUM_BALL    4        //Number of LEDs in the ball 

#define BRIGHTNESS  255      
#define LED_TYPE    WS2812B
#define COLOR_ORDER GRB
CRGB leds[NUM_LEDS];
CRGB tail[NUM_TAIL];



#define UPDATES_PER_SECOND 100

// This example shows how to cross-fade between different color palettes
// using the function nblendPaletteTowardPalette.
//
// The basic idea is that you always have a "current palette" that you're
// pulling colors from with ColorFromPalette, and you have a "target palette"
// which is the 'next' palette that you want to get to.
// 
// After that, implementation is relatively simple: just periodically call
//   nblendPaletteTowardPalette( currentPalette, targetPalette);
// If the current palette is not yet equal to the target palette, this 
// function will make a few small changes to the current palette to make
// it slightly more like the target.  Over time, the current palette will
// come to be equal to the target.
// There's no need to test the current and target for equality; it's safe
// to keep calling nblendPaletteTowardPalette even after current reaches target.
// For faster blending, call nblendPaletteTowardPalette twice per loop.




void setup() {
  delay( 3000 ); // power-up safety delay
  FastLED.addLeds&lt;LED_TYPE, LED_PIN, COLOR_ORDER&gt;(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );
  FastLED.addLeds&lt;LED_TYPE, TAIL_PIN, COLOR_ORDER&gt;(tail, NUM_TAIL).setCorrection( TypicalLEDStrip );
  FastLED.setBrightness(  BRIGHTNESS );
}


//COLOR PALETTES:  Here are several different ways to set up custom color palettes.  More info can be found at http://fastled.io/docs/3.1/group___colorpalletes.html
// Several palettes come pre-defined with FastLED: RainbowColors_p, ForestColors_p, OceanColors_p, HeatColors_p, LavaColors_p, RainbowStripeColors_p 
// so feel free to use those without needing to define them here.  
// Much more info and a list of color definititions can be found at https://github.com/FastLED/FastLED/wiki/Pixel-reference#chsv


// A red and white striped palette -- RedWhite_p
// "CRGB::Gray" is used as white to keep the brightness more uniform.
const TProgmemRGBPalette16 RedOrange_p FL_PROGMEM =
{  CRGB::Red,  CRGB::Red,  CRGB::Red,  CRGB::Red, 
   CRGB::Red, CRGB::Red, CRGB::Red, CRGB::Orange,
   CRGB::Red,  CRGB::Red,  CRGB::Red,  CRGB::Red, 
   CRGB::Red, CRGB::Red, CRGB::Red, CRGB::Orange };


   // A mostly green and dark green palette.  Greens_p
const TProgmemRGBPalette16 Greens_p FL_PROGMEM =
{  CRGB::Green, CRGB::Green, CRGB::DarkGreen, CRGB::DarkGreen, 
   CRGB::Green, CRGB::Green, CRGB::DarkGreen, CRGB::DarkGreen,
   CRGB::Green, CRGB::Green, CRGB::DarkGreen, CRGB::DarkGreen,
   CRGB::Green, CRGB::Green, CRGB::DarkGreen, CRGB::DarkGreen, };

// A pure "fairy light" palette with some brightness variations  FairyLight_p
#define HALFFAIRY ((CRGB::FairyLight &amp; 0xFEFEFE) / 2)
#define QUARTERFAIRY ((CRGB::FairyLight &amp; 0xFCFCFC) / 4)
const TProgmemRGBPalette16 FairyLight_p FL_PROGMEM =
{  CRGB::FairyLight, CRGB::FairyLight, CRGB::FairyLight, CRGB::FairyLight, 
   HALFFAIRY,        HALFFAIRY,        CRGB::FairyLight, CRGB::FairyLight, 
   QUARTERFAIRY,     QUARTERFAIRY,     CRGB::FairyLight, CRGB::FairyLight, 
   CRGB::FairyLight, CRGB::FairyLight, CRGB::FairyLight, CRGB::FairyLight };

// A palette of soft snowflakes with the occasional bright one
const TProgmemRGBPalette16 Snow_p FL_PROGMEM =
{  0x304048, 0x304048, 0x304048, 0x304048,
   0x304048, 0x304048, 0x304048, 0x304048,
   0x304048, 0x304048, 0x304048, 0x304048,
   0x304048, 0x304048, 0x304048, 0xE0F0FF };

// A black "off" palette  Black_p;
const TProgmemRGBPalette16 Black_p FL_PROGMEM =
{  CRGB::Black};

// little twinkles
const TProgmemRGBPalette16 Twinkles_p FL_PROGMEM =
{  CRGB::Black, CRGB::Black, CRGB::Black, CRGB::Black, 
   CRGB::Black, CRGB::Black, CRGB::Black, CRGB::Black,
   CRGB::Gray, CRGB::Black, CRGB::Black, CRGB::Black,
   CRGB::White, CRGB::Black, CRGB::Black, CRGB::Black };

   // purple blue
const TProgmemRGBPalette16 Purples_p FL_PROGMEM =
{  CRGB::Purple, CRGB::Magenta, CRGB::Blue, CRGB::DarkBlue, 
   CRGB::Purple, CRGB::Magenta, CRGB::Blue, CRGB::DarkBlue,
   CRGB::Purple, CRGB::Magenta, CRGB::Blue, CRGB::DarkBlue, 
   CRGB::Purple, CRGB::Magenta, CRGB::Blue, CRGB::DarkBlue };


//define starting palettes here

CRGBPalette16 currentPalette( CRGB::Black);
CRGBPalette16 tailPalette(CRGB::Black);

CRGBPalette16 targetPalette( RedOrange_p );
CRGBPalette16 tailtargetPalette( Greens_p );


void loop()
{  ball();
  ChangePalettePeriodically();

  // Crossfade current palette slowly toward the target palette
  //
  // Each time that nblendPaletteTowardPalette is called, small changes
  // are made to currentPalette to bring it closer to matching targetPalette.
  // You can control how many changes are made in each call:
  //   - the default of 24 is a good balance
  //   - meaningful values are 1-48.  1=veeeeeeeery slow, 48=quickest
  //   - "0" means do not change the currentPalette at all; freeze
  
  uint8_t maxChanges = 24; 
  nblendPaletteTowardPalette( currentPalette, targetPalette, maxChanges);
  nblendPaletteTowardPalette( tailPalette, tailtargetPalette, maxChanges);

  static uint8_t startIndex = 0;
  startIndex = startIndex + 1; /* motion speed */
  FillLEDsFromPaletteColors( startIndex);

  FastLED.show();
  FastLED.delay(1000 / UPDATES_PER_SECOND);
}

void FillLEDsFromPaletteColors( uint8_t colorIndex)
{
  uint8_t brightness = 120;          //You can change the brightness of the front and the tail independenty.
  uint8_t brightnesstail = 255;       // On my hat, having the tail brighter makes the hat look more balanced.
  
  for( int i = 0; i &lt; NUM_LEDS; i++) {
    leds[i] = ColorFromPalette( currentPalette, colorIndex + sin8(i*16), brightness);
    colorIndex += 3;
  }

  for( int t = 0; t &lt; (NUM_TAIL-NUM_BALL); t++) {
    tail[t] = ColorFromPalette( tailPalette, colorIndex + sin8(t*16), brightnesstail);
    colorIndex += 3;
  }
}

//Set up your playlist here

void ChangePalettePeriodically()
{
  uint8_t secondHand = (millis() / 1000) % 225;
  static uint8_t lastSecond = 250;
  
  if( lastSecond != secondHand) {
    lastSecond = secondHand;

     if( secondHand == 5)  { targetPalette = RedOrange_p; tailtargetPalette = Greens_p; }  // red and green Elf
     if( secondHand == 23)  { targetPalette = Black_p; tailtargetPalette = Black_p;} //fade through black
     if( secondHand == 25)  { targetPalette = RainbowColors_p; tailtargetPalette = RainbowColors_p; } //Rainbow
     if( secondHand == 50)  { targetPalette = CloudColors_p; tailtargetPalette = CloudColors_p;} //Clouds
     if( secondHand == 75)  { targetPalette = Twinkles_p; tailtargetPalette = FairyLight_p;} //Fairy lights &amp; Twinkles
     if( secondHand == 100)  { targetPalette = ForestColors_p; tailtargetPalette = OceanColors_p; }  // Green and blue
     if( secondHand == 125)  { targetPalette = FairyLight_p; tailtargetPalette = Greens_p; } // White and red "Santa"
     if( secondHand == 147)  { targetPalette = Black_p; tailtargetPalette = Black_p;} //fade through black
     if( secondHand == 150)  { targetPalette = Snow_p; tailtargetPalette = RedOrange_p;} //Green and white elf
     if( secondHand == 175)  { targetPalette = Purples_p; tailtargetPalette = Purples_p;} //Purple palette
     if( secondHand == 200)  { targetPalette = Twinkles_p; tailtargetPalette = Twinkles_p;}  //twinkles
  }
}

void ball(){

for (uint8_t b = (NUM_TAIL - NUM_BALL); b &lt; NUM_TAIL; b++)
tail[b] = CHSV(160, 0, 200);   
  
FastLED.show();
}


```

This code is fairly easy to modify. &nbsp;You can create your own color palettes and set up your own "playlist" of animations that will change over time. &nbsp;

The way it's written, the code will cycle through several different modes over 225 seconds. &nbsp;Play with the different palettes to come up with your own modes and your own timing.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/691/medium800/led_strips_hat_glow_baby.jpg?1480789149)

# Glowing WhoVille Hat

## Electronics Assembly

![](https://cdn-learn.adafruit.com/assets/assets/000/037/708/medium800/led_strips_29_layoutwired.jpg?1480791014)

We're going to make a sort of triangle shape&nbsp;with your two strips, with the Flora on the left side, and the switch and battery on the right side. &nbsp;The FRONT strip&nbsp;will be wired close to the other components, and the TAIL strip will have a couple feet of lead wire so it reaches easily to its place in your final project.

## Switch Wiring
Carefully cut your Neopixel strips along the cut lines at the length needed for your hat.

&nbsp;

Cut the **male** lead wires (not the ones that plug into the battery, the other ones) off your switch and strip 1/4" of each wire.

&nbsp;

Cut a 3" piece of red wire and black wire, and a 2-3 foot piece of red wire and black wire. Splice both the long and short red wire onto the red wire coming from your switch. Repeat with the black wires.

![led_strips_21_cut.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/696/medium640/led_strips_21_cut.jpg?1480790152)

![led_strips_22_switchtrim.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/697/medium640/led_strips_22_switchtrim.jpg?1480790162)

![led_strips_23_switchwire.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/698/medium640/led_strips_23_switchwire.jpg?1480790174)

## Neopixel Strip Wiring
Cut a 3/4" piece of heat shrink for each end of each strip -- so, 4 pieces total. Slip them over the silicone sheath and up out of the way for now.

&nbsp;

Solder the 3" wires coming from the switch to the **out** end of the **FRONT** strip. &nbsp;(Look for the arrows to indicate data direction and solder to the end the arrows are pointing **towards**.)

&nbsp;

Solder the long wires to the **in end** of the **TAIL** strip (arrows pointing **away**.)

![led_strips_24_heatshrink.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/699/medium640/led_strips_24_heatshrink.jpg?1480790282)

![led_strips_25_stripswired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/700/medium640/led_strips_25_stripswired.jpg?1480790306)

Cut another 3" red and black wire and also a 3" yellow wire. &nbsp;Cut a 2 foot green wire.

&nbsp;

Solder all three&nbsp;3" wires to the **in end** of the **FRONT** strip (the end with no wires yet), and the long green wire to the **in end** of the **TAIL** strip (where the other long wires are already soldered).

![led_strips_26_stripswired2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/704/medium640/led_strips_26_stripswired2.jpg?1480790769)

## Flora Wiring
Solder the other end of the long green wire to Flora's pin 6.

Solder the 3"&nbsp;red wire to VBAT, the black wire to G and the yellow wire to pin 12.

Plug your battery in to the JST connector on your switch and test to be sure all the lights come on.

**The power switch on the Flora board can be left in the “ON” position. The toggle button from the battery is then used to switch the circuit on or off.** If your hat gets bumped and isn’t responding, check that the switch is “on.”

![led_strips_27_florawired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/705/medium640/led_strips_27_florawired.jpg?1480790803)

![led_strips_28_test.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/706/medium640/led_strips_28_test.jpg?1480790816)

 **Once your sure the whole circuit is&nbsp;working** , slip the heat shrink down over the ends of both strips. &nbsp;Fill the end of the silicone sheath with hot glue, then quickly slide the heat shrink over and shrink in place. &nbsp;This will keep your strips water tight and fairly break-resistant.

![led_strips_30_hotglue.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/709/medium640/led_strips_30_hotglue.jpg?1480791192)

![](https://cdn-learn.adafruit.com/assets/assets/000/037/710/medium800/led_strips_hat_rainbow.jpg?1480791291)

# Glowing WhoVille Hat

## Put it All Together

![](https://cdn-learn.adafruit.com/assets/assets/000/037/727/medium800/led_strips_hat_all_together.jpg?1480792163)

## Place Neopixel Strips
Slide the TAIL strip inside the tail, leaving 4-5 LEDs poking out -- these will go inside the ball later on.

&nbsp;

With a needle and thread, stitch carefully through the silicone sheath and tack the strip securely to the top of the hat, with the lights facing inwards.

![led_strips_31_inside.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/712/medium640/led_strips_31_inside.jpg?1480791411)

![led_strips_36_sewstrip.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/713/medium640/led_strips_36_sewstrip.jpg?1480791422)

Slip the Flora in through the opening you left in the pocket on the left front of the hat, with the USB port facing outwards so you can reach it easily for future code updates.

&nbsp;

Slip the switch through the same opening on the other side and feed the battery wire up through the top of the pocket.

&nbsp;

&nbsp;

![led_strips_32_feedwires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/714/medium640/led_strips_32_feedwires.jpg?1480791494)

![led_strips_33_feedwires2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/715/medium640/led_strips_33_feedwires2.jpg?1480791507)

Lay the LED strip inside the front of the hat with the wires tucked behind it, and pin the front facing closed over the LEDs. &nbsp;Carefully stitch the facing closed over the LED strip and wires, leaving an opening at the crown for the tail wires to get out.

&nbsp;

Sew the tail wires neatly to the inside of the crown of the hat so they don't get pulled while you're wearing it.

![led_strips_34_closeflap.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/720/medium640/led_strips_34_closeflap.jpg?1480791765)

![led_strips_35_stitch.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/721/medium640/led_strips_35_stitch.jpg?1480791774)

![led_strips_37_wiremanagement.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/722/medium640/led_strips_37_wiremanagement.jpg?1480791787)

## Dangling Ball
Pull the top off the ball ornament and stuff some fiberfill or other diffusion material inside.

&nbsp;

Carefully fold your LED strip with the lights facing outward, and slip it inside the ball. &nbsp;Add more fiberfill until the lights are nicely placed and diffused.

&nbsp;

With a rubber band, firmly attach the ball to the end of the tail. &nbsp;Cover it up with ribbon or holographic tape to make it look finished.

![led_strips_38_ballstuffing.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/723/medium640/led_strips_38_ballstuffing.jpg?1480791868)

![led_strips_39_ballstuffed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/724/medium640/led_strips_39_ballstuffed.jpg?1480791889)

Note: this part is a little harder than it looks, so take your time and don't be discouraged! &nbsp;I found a pair of needlenose pliers and a chopstick to be extremely helpful.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/728/medium800/led_strips_hat_purple.jpg?1480792198)

Plug your battery into your switch lead and then tuck it down inside the pocket. &nbsp;Turn your hat on and off by squeezing the switch right through the hat.

Go light up the town!


## Featured Products

### Adafruit NeoPixel Digital RGB LED Strip - White 30 LED

[Adafruit NeoPixel Digital RGB LED Strip - White 30 LED](https://www.adafruit.com/product/1376)
You thought it couldn't get better than [our world-famous 32-LED-per-meter Digital LED strip](http://adafruit.com/products/306) but we will prove you wrong! These NeoPixel strips have 30 digitally-addressable pixel LEDs per meter and are very affordable and are only 12.5 mm...

In Stock
[Buy Now](https://www.adafruit.com/product/1376)
[Related Guides to the Product](https://learn.adafruit.com/products/1376/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)
### JST 2-pin Extension Cable with On/Off Switch - JST PH2

[JST 2-pin Extension Cable with On/Off Switch - JST PH2](https://www.adafruit.com/product/3064)
By popular request - we now have a way you can turn on-and-off Lithium Polymer batteries without unplugging them.

This **PH2 Female/Male&nbsp;JST 2-pin Extension Cable&nbsp;** comes with an in-line **Switch** - click once to turn on, click again to turn off....

Out of Stock
[Buy Now](https://www.adafruit.com/product/3064)
[Related Guides to the Product](https://learn.adafruit.com/products/3064/guides)
### Lithium Ion Polymer Battery - 3.7v 1200mAh

[Lithium Ion Polymer Battery - 3.7v 1200mAh](https://www.adafruit.com/product/258)
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 1200mAh for a total of about 4.5 Wh. If you need a larger battery, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/258)
[Related Guides to the Product](https://learn.adafruit.com/products/258/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)
### 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

- [Simple and Beautiful NeoPixel Holiday Lights](https://learn.adafruit.com/simple-beautiful-color-changing-light-strand.md)
- [FLORA + FONA](https://learn.adafruit.com/flora-plus-fona.md)
- [Glue Stick Light Pipe Sculpture](https://learn.adafruit.com/glue-stick-archway.md)
- [Datalogging Hat with FLORA BLE](https://learn.adafruit.com/datalogging-hat-with-flora-ble.md)
- [Using NeoPixels with Netduino Plus 2](https://learn.adafruit.com/using-neopixels-with-netduino.md)
- [Battery Powering Wearable Electronics](https://learn.adafruit.com/battery-powering-wearable-electronics.md)
- [Haptic Headband](https://learn.adafruit.com/haptic-headband.md)
- [LED Trampoline](https://learn.adafruit.com/led-trampoline.md)
- [Neopixel Jewel 10 Minute Necklace](https://learn.adafruit.com/10-minute-neopixel-necklace.md)
- [ISS Pin](https://learn.adafruit.com/iss-pin.md)
- [Sparkle Skirt](https://learn.adafruit.com/sparkle-skirt.md)
- [Flora Brake Light Backpack](https://learn.adafruit.com/flora-brakelight-backpack.md)
- [Icicle Crown with Pebble Pixels & WLED](https://learn.adafruit.com/icicle-crown-with-pebble-pixels-wled.md)
- [Flora-Powered TARDIS Costume (for Dogs!)](https://learn.adafruit.com/wearable-flora-powered-tardis-costume-dogs.md)
- [Cartoon Network and Make Code - Rose Quartz Shield Umbrella](https://learn.adafruit.com/cartoon-network-and-make-code-rose-quartz-shield-umbrella.md)
