# Unicorn Hat with Moving Ears

## Introduction

https://youtu.be/tp-OT4Kkmxc

Turn yourself or someone you love&nbsp;into&nbsp;a magical animatronic rainbow unicorn. &nbsp;

The&nbsp;little girl in your life&nbsp;will very likely refuse to ever take this hat off. &nbsp;(But you can wear it yourself while she's sleeping. We&nbsp;won't tell anyone). &nbsp;

A joystick in the pocket controls servos inside the ears, and the Circuit Playground's onboard LEDs animate the magical glowing rainbow unicorn horn. &nbsp;

We've kept this project fairly simple -- it's a great first step into the world of robotics and servos. &nbsp;This technique will work on any animal hat with attached ears, so if your inner animal is a [panda](https://www.flashingblinkylights.com/panda-hat-with-light-up-arms-and-paw-mittens-sku-no-11815.html?gclid=CP2XyaeLutQCFUaNfgodK5gPsw) or a [fox](http://www.animalheadgear.com/products/Fox-Hat-with-Paws.html)&nbsp;or some&nbsp;[other critter](http://www.animalheadgear.com/categories/Plush-Hats/All-Hats-w-Paws/), go nuts. &nbsp;The world is your animatronic&nbsp;playground.

![](https://cdn-learn.adafruit.com/assets/assets/000/042/593/medium800/circuit_playground_horn_rainbow2.jpg?1497392706)

### Part: Circuit Playground Classic
quantity: 1
The Amazing Circuit Playground Board
[Circuit Playground Classic](https://www.adafruit.com/product/3000)

### Part: Micro Servos
quantity: 2
Tiny motors to drive the ears
[Micro Servos](https://www.adafruit.com/product/169)

### Part: Joystick
quantity: 1
Analog 2-axis Thumb Joystick with Button
[Joystick](https://www.adafruit.com/product/512)

### Part: Silicone Stranded Wire
quantity: 1
26 awg wire in 3-4 colors
[Silicone Stranded Wire](https://www.adafruit.com/product/1970)

### Part: Perma-Proto Breadboard
quantity: 1
Half Size Breadboard
[Perma-Proto Breadboard](https://www.adafruit.com/product/571)

To use standard AA batteries (safer, recommended if this will be worn by a child):

### Part: AA Battery Holder
quantity: 1
4xAA Battery Holder with Switch
[AA Battery Holder](https://www.adafruit.com/product/830)

or, for rechargeable power (longer life but slight fire hazard, use with knowledge of the risks):

### Part: LiPoly Battery
quantity: 1
Rechargeable 2500 mAh Battery
[LiPoly Battery](https://www.adafruit.com/product/328)

### Part: On/Off Switch
quantity: 1
Battery Extension Cable with On/off switch
[On/Off Switch](https://www.adafruit.com/product/3064)

### Part: Battery Charger
quantity: 1
Charger for LiPoly Battery
[Battery Charger](https://www.adafruit.com/product/1304)

# Other Materials

- Hat with Ears and pockets:&nbsp;I used this [Magicorn Hat&nbsp;from Smoko](https://www.smokonow.com/products/magicorn)
- 3mm Light Pipe:&nbsp;[I used these LED shoelaces from Flammi](https://www.amazon.com/gp/product/B00UMT9SOS/ref=oh_aui_detailpage_o02_s00?ie=UTF8&psc=1)
- 3d Printed Circuit Playground case: [download and print your own](https://www.thingiverse.com/thing:2383357) or [order from Shapeways](https://www.shapeways.com/product/LPL6HR6AX/circuit-playground-case-for-adafruit-unicorn-hat)

# Tools

- Soldering iron & accessories
- 3d Printer (optional)
- Heat Gun
- Hot Glue gun or E6000 glue
- Needle & thread

![](https://cdn-learn.adafruit.com/assets/assets/000/042/594/medium800/circuit_playground_unicorn_goat.jpg?1497392723)

- [Next Page](https://learn.adafruit.com/unicorn-hat-with-moving-ears/code.md)

## Featured Products

### Circuit Playground Classic

[Circuit Playground Classic](https://www.adafruit.com/product/3000)
Would you like to learn electronics, with an all-in-one board that has sensors and LEDs built in? **Circuit Playground** is here - and it's the best way to practice programming on real hardware with no soldering or sewing required!

This is the **Classic**...

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

[Micro servo](https://www.adafruit.com/product/169)
Tiny little servo can rotate approximately 180 degrees (90 in each direction) and works just like the standard kinds you're used to but _smaller_. You can use any servo code, hardware, or library to control these servos. Good for beginners who want to make stuff move without...

Out of Stock
[Buy Now](https://www.adafruit.com/product/169)
[Related Guides to the Product](https://learn.adafruit.com/products/169/guides)
### Analog 2-axis Thumb Joystick with Select Button + Breakout Board

[Analog 2-axis Thumb Joystick with Select Button + Breakout Board](https://www.adafruit.com/product/512)
This mini-kit makes it easy to mount a PSP/Xbox-like thumb joystick to your project. The thumbstick is an analog joystick - more accurate and sensitive than just 'directional' joysticks - with a 'press in to select' button. Since it's analog, you'll need two analog...

In Stock
[Buy Now](https://www.adafruit.com/product/512)
[Related Guides to the Product](https://learn.adafruit.com/products/512/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)
### Adafruit Perma-Proto Half-sized Breadboard PCB - 3 Pack!

[Adafruit Perma-Proto Half-sized Breadboard PCB - 3 Pack!](https://www.adafruit.com/product/571)
Customers have asked us to carry basic perf-board, but we never liked the look of most basic perf: its always crummy quality, with pads that flake off and no labeling. Then we thought about how people **actually** prototype - usually starting with a solderless breadboard and then...

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

In Stock
[Buy Now](https://www.adafruit.com/product/3064)
[Related Guides to the Product](https://learn.adafruit.com/products/3064/guides)
### 4 x AA Battery Holder with On/Off Switch

[4 x AA Battery Holder with On/Off Switch](https://www.adafruit.com/product/830)
Make a nice portable power pack with this 4 x AA battery holder. It fits any alkaline or rechargeable AA batteries in series. There's a snap on cover and an on/off switch which can be handy when wiring to something without a switch.

**New**! We now have 0.1" headers...

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

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

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

## Related Guides

- [Introducing Circuit Playground](https://learn.adafruit.com/introducing-circuit-playground.md)
- [Reverse Geocache Box](https://learn.adafruit.com/reverse-geocache-engagement-box.md)
- [Circuit Playground Password Vault](https://learn.adafruit.com/circuit-playground-password-vault.md)
- [How Cold Is It?](https://learn.adafruit.com/how-cold-is-it.md)
- [Ninja Timer: Giant 7-Segment Display](https://learn.adafruit.com/ninja-timer-giant-7-segment-display.md)
- [Ever-Burning Flame Painting](https://learn.adafruit.com/ever-burning-flame-painting.md)
- [Overwatch Prop Gun: Lucio's Blaster Pt. 3](https://learn.adafruit.com/overwatch-prop-gun-lucios-blaster-pt-3.md)
- [Sword & Wand Prop Effects with Circuit Playground](https://learn.adafruit.com/sword-and-wand-prop-effects-with-circuit-playground.md)
- [Circuit Playground Beep Beep](https://learn.adafruit.com/circuit-playground-beep-beep.md)
- [DIY Bluetooth Gamepad](https://learn.adafruit.com/diy-bluetooth-gamepad.md)
- [Glowing Smokey Skull ](https://learn.adafruit.com/glowing-smokey-skull.md)
- [Circuit Playground & Bluetooth Low Energy](https://learn.adafruit.com/circuit-playground-and-bluetooth-low-energy.md)
- [PianoGlove](https://learn.adafruit.com/pianoglove.md)
- [Dear Diary Alarm](https://learn.adafruit.com/dear-diary-alarm.md)
- [Circuit Playground Analog Input](https://learn.adafruit.com/circuit-playground-analog-input.md)
- [Circuit Playground Lesson #0](https://learn.adafruit.com/circuit-playground-lesson-number-0.md)
