# NeoPixel LED Mickey Ears

## Overview

https://youtu.be/41WSw2PpEVM

## Light Up Ears

In this project we’ll show you how to make your own set of light up Mickey Ears.&nbsp;

We made it so they flash like fireworks when you shake your head.&nbsp;

In this learn guide, you'll see how to wire up the electronics to make your own set of NeoPixel Mickey Ears.

![leds_hero-sil.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/469/medium640/leds_hero-sil.jpg?1567628254)

## Flexible Neon NeoPixel Strips

These are really bright LEDs that look a lot like neon lights.&nbsp;They’re Adafruit NeoPixel Strips with extra thick silicone so the diffusion looks really nice.&nbsp;They’re individually addressable, so you can create really nice animations.

![leds_hero-neon.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/433/medium640/leds_hero-neon.jpg?1567606281)

## Shake to Sparkle

Motion activated LED animations can be done in a number of different ways. In this guide, a tilt-switch is used to trigger LED animations. This build will use MakeCode to program the hardware!

![leds_hero-shake-loop.gif](https://cdn-learn.adafruit.com/assets/assets/000/080/467/medium640thumb/leds_hero-shake-loop.jpg?1567628217)

## Wearable Ear Hats

We got these mickey ears from Disney World, but you could use whatever you like. These mickey shorts style of ears feature pre-made holes just behind the ear cups.

![leds_mickey-ears.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/431/medium640/leds_mickey-ears.jpg?1567605933)

![](https://cdn-learn.adafruit.com/assets/assets/000/080/395/medium800/leds_parts.jpg?1567565892)

## Prerequisite Guides

There's resources in these guides that go beyond what's covered in this tutorial. The introduction guides walks you through all of the pinouts and setting up MakeCode with Adafruit's supported board.

- [Intro to Adafruit GEMMA M0](https://learn.adafruit.com/adafruit-gemma-m0/what-is-makecode-maker)

## Parts List

Here's a list of parts. You'll need to choose your NeoPixel LED strip – There's a few different densities and styles to pick from.

**NeoPixel LED Strips (Pick one)**

- Adafruit Flexible Neon Strip –&nbsp;[https://www.adafruit.com/product/4310](https://www.adafruit.com/product/4310)
- Adafruit NeoPixel Side Light Strip 90 –&nbsp;[https://www.adafruit.com/product/3635](https://www.adafruit.com/product/3635)
- Adafruit NeoPixel Side Light Strip 60 –&nbsp;[https://www.adafruit.com/product/3636](https://www.adafruit.com/product/3636)

### Flexible Silicone Neon-like Skinny NeoPixel LED Strip

[Flexible Silicone Neon-like Skinny NeoPixel LED Strip](https://www.adafruit.com/product/4310)
You love NeoPixels, and you love silicone diffusion? Peep this&nbsp; **Flexible Silicone Neon-like Skinny NeoPixel LED Strip**! OK it's a bit of a mouthful, but check out the beautiful footage! It&nbsp;_looks_&nbsp;a lot like a slim strip of neon, but without the need...

In Stock
[Buy Now](https://www.adafruit.com/product/4310)
[Related Guides to the Product](https://learn.adafruit.com/products/4310/guides)
![Demo Video of hands squeezing and unraveling the illuminated Flexible Silicone Neon-like Skinny NeoPixel LED Strip.](https://cdn-shop.adafruit.com/product-videos/640x480/4310-00.jpg)

### Adafruit NeoPixel LED Side Light Strip - Black 60 LED

[Adafruit NeoPixel LED Side Light Strip - Black 60 LED](https://www.adafruit.com/product/3636)
Fancy new _side light_ LED strips are a great alternative for folks who have loved and used Adafruit LED strips for a few years but want gorgeous, glowy&nbsp;light emitting at 90 degrees. They're very skinny so you can run them along a thin edge and curve them around shapes and...

In Stock
[Buy Now](https://www.adafruit.com/product/3636)
[Related Guides to the Product](https://learn.adafruit.com/products/3636/guides)
![Top down view of an Adafruit NeoPixel Digital RGB  60 LED-per-meter strip.](https://cdn-shop.adafruit.com/640x480/3636-03.jpg)

### Adafruit NeoPixel LED Side Light Strip - Black 90 LED

[Adafruit NeoPixel LED Side Light Strip - Black 90 LED](https://www.adafruit.com/product/3635)
Fancy new _side light_ LED strips are a great alternative for folks who have loved and used Adafruit LED strips for a few years but want gorgeous, glowy&nbsp;light emitting at 90 degrees. They're very skinny so you can run them along a thin edge and curve them around shapes and...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3635)
[Related Guides to the Product](https://learn.adafruit.com/products/3635/guides)
![Top down view anAdafruit NeoPixel Digital RGB 90 LED-per-meter strip.](https://cdn-shop.adafruit.com/640x480/3635-04.jpg)

 **Adafruit GEMMA M0** –&nbsp;[https://www.adafruit.com/product/3501](https://www.adafruit.com/product/3501)

- Tilt Ball Switch –&nbsp;[https://www.adafruit.com/product/173](https://www.adafruit.com/product/173)

**Battery, Switch and Wires**

- Slide Switch –&nbsp;[https://www.adafruit.com/product/805](https://www.adafruit.com/product/805)
- 500mAh Battery –&nbsp;[https://www.adafruit.com/product/1578](https://www.adafruit.com/product/1578)
- JST Extension Cable –&nbsp;[https://www.adafruit.com/product/1131](https://www.adafruit.com/product/1131)
- 10 Wire Silicone Cover Ribbon Cable –&nbsp;[https://www.adafruit.com/product/3890](https://www.adafruit.com/product/3890)&nbsp;

### Adafruit GEMMA M0 - Miniature wearable electronic platform

[Adafruit GEMMA M0 - Miniature wearable electronic platform](https://www.adafruit.com/product/3501)
The **Adafruit Gemma M0** is a super small microcontroller board, with just enough built-in to create many simple projects. It may look small and cute: round, about the size of a quarter, with friendly alligator-clip sew pads. But do not be fooled! The Gemma M0 is incredibly...

In Stock
[Buy Now](https://www.adafruit.com/product/3501)
[Related Guides to the Product](https://learn.adafruit.com/products/3501/guides)
![Pink polished fingers holding a Adafruit GEMMA M0 - Miniature wearable electronic platform. ](https://cdn-shop.adafruit.com/product-videos/640x480/3501-05.jpg)

### Tilt ball switch

[Tilt ball switch](https://www.adafruit.com/product/173)
The "poor man's" accelerometer! Tilt sensors are switches that can detect basic motion/orientation. The metal tube has a little metal ball that rolls around in it, when its tilted upright, the ball rolls onto the contacts sticking out of end and shorts them together.

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/173)
[Related Guides to the Product](https://learn.adafruit.com/products/173/guides)
![Metal cylinder with two wires sticking out](https://cdn-shop.adafruit.com/640x480/173-02.jpg)

### JST-PH Battery Extension Cable - 500mm

[JST-PH Battery Extension Cable - 500mm](https://www.adafruit.com/product/1131)
By popular demand, we now have a handy extension cord for all of our JST PH-terminated battery packs (such as our LiIon/LiPoly and 3xAAA holders). One end has a JST-PH compatible socket, and the other end has a matching plug. Between the two, 500mm of color coded wire. Handy for wearable...

In Stock
[Buy Now](https://www.adafruit.com/product/1131)
[Related Guides to the Product](https://learn.adafruit.com/products/1131/guides)
![Front shot of JST-PH Battery Extension Cable.](https://cdn-shop.adafruit.com/640x480/1131-00.jpg)

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

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

In Stock
[Buy Now](https://www.adafruit.com/product/1578)
[Related Guides to the Product](https://learn.adafruit.com/products/1578/guides)
![Angled shot of a Lithium Ion Polymer Battery 3.7V 500mAh with JST-PH connector.](https://cdn-shop.adafruit.com/640x480/1578-03.jpg)

### Breadboard-friendly SPDT Slide Switch

[Breadboard-friendly SPDT Slide Switch](https://www.adafruit.com/product/805)
These nice switches are perfect for use with breadboard and perfboard projects. They have 0.1" spacing and snap in nicely into a solderless breadboard. They're easy to switch no matter what size fingers you have, but not so easy that they'll get flipped by accident. Work great as...

In Stock
[Buy Now](https://www.adafruit.com/product/805)
[Related Guides to the Product](https://learn.adafruit.com/products/805/guides)
![Small, black, SPDT slide switch.](https://cdn-shop.adafruit.com/640x480/805-03.jpg)

### Silicone Cover Stranded-Core Ribbon Cable - 10 Wire 1 Meter Long

[Silicone Cover Stranded-Core Ribbon Cable - 10 Wire 1 Meter Long](https://www.adafruit.com/product/3890)
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/3890)
[Related Guides to the Product](https://learn.adafruit.com/products/3890/guides)
![10 wire Silicone Cover Stranded-Core Ribbon Cable](https://cdn-shop.adafruit.com/640x480/3890-01.jpg)

### Adafruit Micro-Lipo Charger for LiPoly Batt with USB Type C Jack

[Adafruit Micro-Lipo Charger for LiPoly Batt with USB Type C Jack](https://www.adafruit.com/product/4410)
Oh so handy, this little lipo charger is so small and easy to use you can keep it on your desk or mount it easily into any project! Simply plug it via any USB C cable into a USB port and a 3.7V/4.2V lithium polymer or lithium ion rechargeable battery into the JST plug on the other end. There...

In Stock
[Buy Now](https://www.adafruit.com/product/4410)
[Related Guides to the Product](https://learn.adafruit.com/products/4410/guides)
![Adafruit Micro-Lipo Charger for LiPoly Batt with USB Type C Jack connected to Lipoly battery and USB cable. ](https://cdn-shop.adafruit.com/640x480/4410-05.jpg)

# Tools
### Helping Third Hand Magnifier W/Magnifying Glass Tool

[Helping Third Hand Magnifier W/Magnifying Glass Tool](https://www.adafruit.com/product/291)
The classic 'third hand tool,' as seen on every desk! We have one next to our [Panavise jr](//www.adafruit.com/products/151), they complement each other well. This tool is good for holding small PCBs and wires for tinning or soldering to parts.

&nbsp;

- Every...

In Stock
[Buy Now](https://www.adafruit.com/product/291)
[Related Guides to the Product](https://learn.adafruit.com/products/291/guides)
![Third Hand Magnifier with two alligator grabbers and Magnifying Glass](https://cdn-shop.adafruit.com/640x480/291-01.jpg)

### Multi-Colored Heat Shrink Pack - 3/32" + 1/8" + 3/16" Diameters

[Multi-Colored Heat Shrink Pack - 3/32" + 1/8" + 3/16" Diameters](https://www.adafruit.com/product/1649)
Heat shrink is the duct tape of electronics which I guess makes this heat shrink the colorful and exciting duct tape they sell&nbsp;at craft stores. &nbsp;This heat shrink comes in six different colors - red, blue, green, yellow, white and the traditional black.

Each pack contains ten...

In Stock
[Buy Now](https://www.adafruit.com/product/1649)
[Related Guides to the Product](https://learn.adafruit.com/products/1649/guides)
![Array of many colorful heatshrink tubes.](https://cdn-shop.adafruit.com/640x480/1649-00.jpg)

### Hakko Professional Quality 20-30 AWG Wire Strippers

[Hakko Professional Quality 20-30 AWG Wire Strippers](https://www.adafruit.com/product/527)
These are the finest wire strippers we have used, and if you have to do a lot of wiring, you will agree! They have soft rounded grips - very comfortable to use, and precision ground notches that do a perfect job every time. No more yanking or twisting to strip wires cleanly and quickly.<br...></br...>

In Stock
[Buy Now](https://www.adafruit.com/product/527)
[Related Guides to the Product](https://learn.adafruit.com/products/527/guides)
![Red and black multi-size wire stripplers, closed](https://cdn-shop.adafruit.com/640x480/527-02.jpg)

### Flush diagonal cutters

[Flush diagonal cutters](https://www.adafruit.com/product/152)
These are the best diagonal cutters, large super-comfortable grip to use and have strong nippers for perfect trimming of wires and leads. I've used my pair every day for years.

In Stock
[Buy Now](https://www.adafruit.com/product/152)
[Related Guides to the Product](https://learn.adafruit.com/products/152/guides)
![Red and black diagonal flush cutters](https://cdn-shop.adafruit.com/640x480/152-02.jpg)

# NeoPixel LED Mickey Ears

## Circuit Diagram

The wiring diagram below provides a visual reference for connecting the components. It is not true to scale, it is just meant to be used as reference. This diagrams was created using the&nbsp;[Fritzing software package](http://fritzing.org/download/).

Take a moment to review the components in the circuit diagram. This illustration is meant for&nbsp;referencing wired connections - the length of wire,&nbsp;position and size of components are not exact.

![](https://cdn-learn.adafruit.com/assets/assets/000/080/383/medium800/leds_circuit-diagram-gemma.jpg?1567563903)

Wires are measured and cut to have enough slack to reach each component.

Silicone ribbon wire is used to make them easier to coil and manage each wire inside the tight spacing. The wire lengths used are listed below:

LED strip for Ears: 310mm (remove 1.75mm of sheath)&nbsp;

Gemma to LED Strip connector:&nbsp;90mm&nbsp;

Strip to Strip Connection:&nbsp;160mm

JST Extension:&nbsp;240mm

Add Slide Switch about 60mm from the female connector

![leds_parts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/384/medium640/leds_parts.jpg?1567564133)

# NeoPixel LED Mickey Ears

## MakeCode

## MakeCode for Adafruit Boards

MakeCode Maker is an easy-to-use block-based programming editor that runs in the Google Chrome web browser. It’s has an intuitive interface and features lots of examples and demos.

The Maker version works with supported Adafruit boards, so you can make interactive projects with a wide selection of microcontroller boards.

## NeoPixel Mickey Ear Code

Click the links below to launch the code in maker.makecode.com. The GEMMA M0 version uses the tilt-ball switch.

[Edit Gemma Code](https://makecode.com/_C27Mgd4deL8v)
## GEMMA M0 MakeCode

A NeoPixel strip is created with the **set strip** block. It's set to pin **D0** with **60** pixels. The&nbsp; **strip brightness** block tells the strip how bright to glow on start. An&nbsp; **on touch** block is used to detect when a pin is triggered.

When the tilt-ball switch is triggered on pin **D1** , the LED flash animation will run for a few seconds. In the **forever** loop, several light blocks are setup to cycle through animations for a few seconds each.

![](https://cdn-learn.adafruit.com/assets/assets/000/080/434/medium800/leds_makecode.jpg?1567610962)

## Pair Device and Upload

Once you have the MakeCode program open, click the **edit** button on the top right to open it in a new MakeCode project.

The GEMMA M0, code blocks and simulator will be ready to modify. Let's get the device paired with WebUSB.

1. Click on the **Gear icon** , at the top right.
2. Select **Pair Device** from the dropdown.
3. Click on **GEMMA M0** and **Connect.** 
4. Click the big blue **Download** button to upload the code.

![leds_makecode--sim.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/393/medium640/leds_makecode--sim.jpg?1567565725)

## Testing Code

The NeoPixel LED strips and tilt-ball switch should be wired up to the GEMMA M0. If you haven't already, take a moment to do so now. Shaking the tilt-ball should trigger the flashing LED animation. The rainbow and chasing animations are programmed to loop until touch is detected on Pin **D1**.

[The Maker version of MakeCode](https://maker.makecode.com/) supports lots of boards from Adafruit and the open source community. In your MakeCode program, click on the **gear** icon and select **change board**. Take a moment to browse the support boards, there's a great selection!

![leds_makecode-boards.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/390/medium640/leds_makecode-boards.jpg?1567565352)

 **Any supported board from Adafruit can pair with the device via WebUSB so it’s easy to connect.**

You can also share the code and download it from any computer using the Chrome browser.

With the GEMMA M0, you can hook up a strip of NeoPixels using alligator clips which is nice because you don’t need to solder.

![leds_makecode-gemma.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/391/medium640/leds_makecode-gemma.jpg?1567565431)

![leds_makecode-wide.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/392/medium640/leds_makecode-wide.jpg?1567565483)

# NeoPixel LED Mickey Ears

## What is MakeCode Maker?

![](https://cdn-learn.adafruit.com/assets/assets/000/063/972/medium800thumb/makecode_makerdemo.jpg?1540186091)

**MakeCode Maker**, https://maker.makecode.com, is a web-based code editor for physical computing. It provides a block editor, similar to Scratch or Code.org, and also a JavaScript editor for more advanced users. 

Some of the key features of MakeCode are:

* **web based editor:** nothing to install
* **cross platform:** works in most modern browsers from tiny phone to giant touch screens
* **compilation in the browser:** the compiler runs in your browser, it's fast and works offline
* **blocks + JavaScript:** drag and drop blocks or type JavaScript, MakeCode let's you go back and forth between the two.
* **works offline:** once you've loaded the editor, it stays cached in your browser.
* **event based runtime:** easily respond to button clicks, shake gestures and more


### 

[makecode.adafruit.com](https://makecode.adafruit.com/)&nbsp;and&nbsp;[maker.makecode.com](https://maker.makecode.com/)&nbsp;are editors built using the&nbsp;[MakeCode](https://github.com/Microsoft/pxt)&nbsp;project. In both editors, one can use drag-and-drop blocks or JavaScript to program micro-controllers.

- [makecode.adafruit.com](https://makecode.adafruit.com/)&nbsp;specifically applies to the&nbsp; **Adafruit Circuit Playground Express only**
- [maker.makecode.com](https://maker.makecode.com/)&nbsp;aims at supporting the **Adafruit Express** boards (and more boards from different manufacturers), with an emphasis on breadboarding support.

### 

Yes, Maker is open source under MIT at [https://github.com/Microsoft/pxt-maker](https://github.com/Microsoft/pxt-maker,).

### Adafruit METRO M0 Express - designed for CircuitPython

[Adafruit METRO M0 Express - designed for CircuitPython](https://www.adafruit.com/product/3505)
Metro is our series of microcontroller boards for use with the Arduino IDE. This new **Metro M0 Express** board looks a whole lot like our&nbsp;[original Metro 328](https://www.adafruit.com/product/2488), but with a huge upgrade. Instead of the ATmega328, this Metro...

In Stock
[Buy Now](https://www.adafruit.com/product/3505)
[Related Guides to the Product](https://learn.adafruit.com/products/3505/guides)
![Angled shot of a Adafruit METRO M0 Express - designed for CircuitPython.](https://cdn-shop.adafruit.com/640x480/3505-10.jpg)

### Adafruit Feather M0 Express

[Adafruit Feather M0 Express](https://www.adafruit.com/product/3403)
At the Feather M0's heart is an ATSAMD21G18 ARM Cortex M0+ processor, clocked at 48 MHz and at 3.3V logic, the same one used in the new&nbsp;[Arduino Zero](https://www.adafruit.com/products/2843). This chip has a whopping 256K of FLASH (8x more than the Atmega328 or 32u4) and...

In Stock
[Buy Now](https://www.adafruit.com/product/3403)
[Related Guides to the Product](https://learn.adafruit.com/products/3403/guides)
![Angled shot of rectangular microcontroller.](https://cdn-shop.adafruit.com/640x480/3403-04.jpg)

### Adafruit GEMMA M0 - Miniature wearable electronic platform

[Adafruit GEMMA M0 - Miniature wearable electronic platform](https://www.adafruit.com/product/3501)
The **Adafruit Gemma M0** is a super small microcontroller board, with just enough built-in to create many simple projects. It may look small and cute: round, about the size of a quarter, with friendly alligator-clip sew pads. But do not be fooled! The Gemma M0 is incredibly...

In Stock
[Buy Now](https://www.adafruit.com/product/3501)
[Related Guides to the Product](https://learn.adafruit.com/products/3501/guides)
![Pink polished fingers holding a Adafruit GEMMA M0 - Miniature wearable electronic platform. ](https://cdn-shop.adafruit.com/product-videos/640x480/3501-05.jpg)

### Adafruit Trinket M0 - for use with CircuitPython & Arduino IDE

[Adafruit Trinket M0 - for use with CircuitPython & Arduino IDE](https://www.adafruit.com/product/3500)
The&nbsp;Adafruit Trinket M0 may be small, but do not be fooled by its size! It's a tiny microcontroller board, built around the Atmel ATSAMD21, a little chip with _a lot_ of power. We wanted to design a microcontroller board that was small enough to fit into any project, and low...

In Stock
[Buy Now](https://www.adafruit.com/product/3500)
[Related Guides to the Product](https://learn.adafruit.com/products/3500/guides)
![Manicured hand holding Trinket M0.](https://cdn-shop.adafruit.com/640x480/3500-04.jpg)

# NeoPixel LED Mickey Ears

## Editing Blocks

The block editor is the easiest way to get started with MakeCode Maker. You can drag and drop blocks from the category list. Each time you make a change to the blocks, the simulator will automatically restart and run the code. You can test your program in the browser! The simulator will also generate the wiring for your breadboard for simple programs.


![](https://cdn-learn.adafruit.com/assets/assets/000/063/975/medium800thumb/makecode_makerdemo.jpg?1540187129)

Info: 

## Blinky!

The animation above shows to use the blocks to create a program that blinks an LED.

Creating a blink effect is done by setting the pin HIGH, **pause** for a little, then set the pin LOW, pause for a little, then repeat **forever**.

* **forever** runs blocks in a loop with a 20ms pause in between (it is similar to Arduino **loop**).
* **digital write pin** sets the pin to high or low
* **pause** blocks the current thread for 100ms. If other events or forever loops are running, they have the opporunity to run in parallel.


![](https://cdn-learn.adafruit.com/assets/assets/000/063/974/medium800/makecode_image.png?1540186805)

# NeoPixel LED Mickey Ears

## Downloading and Flashing

Getting your code into your device is very easy with MakeCode. You do not need to install any software on your machine and the process takes two steps:

* Step 1: Connect your board via USB
* Step 2: **Compile and Download** the .uf2 file into your board drive

We are going to go through these two steps in detail.

## Step 1: Connect your board via USB

Connect your board to your computer via a USB cable. You should see a **MAKECODE** drive appear in your file explorer/finder. If your board is in bootloader mode, you will see drive names like **METROBOOT** or **GEMMABOOT**. We will call those **boardnameBOOT**.

Info: 

## Step 2: Test your code in the simulator

**Let's first verify that our code compiles properly in MakeCode.**

MakeCode has a built-in simulator that re-loads and re-runs code when restarted. This is an easy way to both ensure that our code compiles and simulate it before moving it onto the board. The refresh button re-loads the simulator with your latest version of block code. 

![](https://cdn-learn.adafruit.com/assets/assets/000/063/976/medium800thumb/makecode_blinksim.jpg?1540187679)

Warning: 

## Step 3: Download and flash your code

If your board is working in the simulator, it's time to download it to your actual board! Click the **Download** button. It will generate a .uf2 file and download it to your computer. [UF2](https://github.com/Microsoft/uf2) is a file format designed by Microsoft to flash microcontrollers over USB.

### General Steps to copy over your program (not specific to any Operating system)

\* Ensure your board is connected via USB.  
\* Find the .uf2 file generated by MakeCode in your file explorer. Copy it to the **MAKECODE** or **boardnameBOOT** volume.   
\* The status LED on the board will blink while the file is transferring. Once it's done transferring your file, the board will automatically reset and start running your code (just like in the simulator!)

Info: 

# NeoPixel LED Mickey Ears

## Saving and Sharing

## Extracting your code from the board

The .uf2 file you created by clicking on the Compile button in MakeCode also contains the source code of your program!

You can open this file in MakeCode by dragging and dropping it into the browser to edit it.

You can also find the current .uf2 file running on the **MAKECODE** or **boardnameBOOT** drive.

## Sharing

You can share your code by clicking on the share button. After confirmation, MakeCode will create a short unique URL for your code. Anyone with that URL will be able to reload the code.

These URLs can also be used to embed the editor your blog or web pages! Just copy paste the URL in your text editor and (if it supports oEmbed) it will automatically load it in your page.

![](https://cdn-learn.adafruit.com/assets/assets/000/063/985/medium800/makecode_image.png?1540222659)

# NeoPixel LED Mickey Ears

## Assemble

## Measure the Strip

To start I'll measure the length LED strip required to fit over each ear.

I cut two Neon strips that measured in at&nbsp;310mm each.

If you choose to use regular NeoPixel strip, the size will measure in at about&nbsp;280mm.

Use&nbsp;scissors to cut between the pads as shown in the pictures.

## Expose Pads

I removed about 17mm of sheathing from the strip so we can fit the strip into slits to be cut on the hat.&nbsp;

![leds_strip-measure.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/385/medium640/leds_strip-measure.jpg?1567564472)

![leds_strip-expose.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/386/medium640/leds_strip-expose.jpg?1567564503)

## Prep the Hat

I used Adafruit&nbsp;[ceramic blades](https://www.adafruit.com/product/4306) to cut four slits on each side of both ears.

It only needs to be the width of the strip, which happens to be the same width as the ears.&nbsp;

## &nbsp;

## Fit Strips into Slits

**Take note of the arrow directions of the LED strips.**

Fit the ends of the strips into the slits and **make sure the arrows all go in the correct direction**.

![leds_hat-cut.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/405/medium640/leds_hat-cut.jpg?1567601826)

![leds_strips-fit.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/406/medium640/leds_strips-fit.jpg?1567601892)

![leds_strips-fit-hat-wide.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/408/medium640/leds_strips-fit-hat-wide.jpg?1567602052)

![leds_strips-fitted.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/410/medium640/leds_strips-fitted.jpg?1567602149)

## Solder Strip Wires

At this point, I proceeded to tin and solder the wires to each side of the first strip.

I measured and cut a [silicone ribbon](https://www.adafruit.com/product/3927) cable to connect the&nbsp;Gemma to the first strip, about 90mm long.

The second strip will connect to the first with a 160mm long wire.

&nbsp;

![leds_strip-wires-to-gemma.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/401/medium640/leds_strip-wires-to-gemma.jpg?1567601377)

![leds_strip-wires-to-strip.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/402/medium640/leds_strip-wires-to-strip.jpg?1567601442)

Danger: 

## Solder Tilt Switch

Use a small amount of solder to tin the GND and **A0** pads on the Gemma.

To fit the tilt switch over the **GND** and **A0** , I used pliers to gently bend the two pins apart so they have enough distance to reach the pads.

&nbsp;

![leds_gemma-tilt-spread.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/403/medium640/leds_gemma-tilt-spread.jpg?1567601558)

![leds_gemma-tilt-solder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/404/medium640/leds_gemma-tilt-solder.jpg?1567601625)

## Thread and Strip Wires

I'll first thread the wires that will connect the Gemma to the first strip.

Pass the wires through the slit and then route the wires into the ear through the rivet eyelets.&nbsp;

Pass the wires through until the LED strip in taught around the ear.

![leds_strip-thread.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/411/medium640/leds_strip-thread.jpg?1567602238)

![leds_strip-thread-side.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/412/medium640/leds_strip-thread-side.jpg?1567602277)

## Solder the Gemma

I used a third helping hand to hold the Gemma while soldering the LED strip connections.

I'll have to share the **GND** pad, so we can carefully tin the opposite side of the pad to connect the LED strip.

![leds_gemma-strip-solder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/416/medium640/leds_gemma-strip-solder.jpg?1567603575)

![leds_gemma-strip-soldered.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/417/medium640/leds_gemma-strip-soldered.jpg?1567603603)

## JST Slide Switch

I used a 2-pin JST Extension cable so we can easily disconnect the battery. Measure a cut the cable to&nbsp;240mm.

To power the circuit on and off, you’ll need to build a slide switch adapter.

I then measured and cut the JST Extension wire at about 60mm from the female connector to solder a slide switch in line with the voltage wire.

&nbsp;

![leds_jst-parts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/418/medium640/leds_jst-parts.jpg?1567603678)

![leds_jst-power-solder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/419/medium640/leds_jst-power-solder.jpg?1567603731)

## Heat Shrink

I used heat shrink tubing to insulate the two pins on the slide switch&nbsp;connections and one the ground wire.  
&nbsp;

![leds_jst-power-soldered.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/420/medium640/leds_jst-power-soldered.jpg?1567603795)

![leds_jst-power-soldered-wide.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/421/medium640/leds_jst-power-soldered-wide.jpg?1567603879)

Danger: 

## Mount board

Next I'll test out the circuit to make sure the tilt switch tiggers correctly.

I used a piece of black duck tape to match the color of the ears.

Take note of the tilt switch orientation and then apply a strip of duck tape over the Gemma and tilt switch.&nbsp;

I placed the Gemma with the USB port on the edge of the tape to allow a USB cable to easily plug in for reprogramming.

Apply pressure on the tape edges to adhere it to the ear.

![leds_gemma-mount.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/422/medium640/leds_gemma-mount.jpg?1567603954)

![leds_gemma-mounted.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/423/medium640/leds_gemma-mounted.jpg?1567604761)

## Mount the Battery

Place the Slide switch on the edge of the duck tape to have easy access to it.

I carefully placed the battery close the to slide switch and then oriented the switch close to the edge on the ear. This way I can easily turn the circuit on and off.

![leds_jst-mount.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/424/medium640/leds_jst-mount.jpg?1567604790)

![leds_jst-mounted.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/425/medium640/leds_jst-mounted.jpg?1567604907)

## Glue Strips

Now we can finally start to glue down the LED strips to the ears.&nbsp;

Double check the circuit still functions properly.

I used&nbsp;[Dap 00694&nbsp;Silicone&nbsp;Rubber Sealant](https://www.amazon.com/gp/product/B000PSB1VY/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1)&nbsp;to adhere the strips to the ears. Use small binder clips to hold each glued section.&nbsp;

Allow the glue to dry for about 24 hours.

![leds_glue-strip.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/426/medium640/leds_glue-strip.jpg?1567604863)

![leds_binders.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/427/medium640/leds_binders.jpg?1567604999)

## Complete!

Test the circuit by shaking to active animations. You can adjust the tilt switch if needed.

Test that the strip is properly glued down. I had to go back and reapply additional drops of glue to sections. The most important parts to check are the sections were the the strips are close the hat slits.

&nbsp;

![leds_hero-loop.gif](https://cdn-learn.adafruit.com/assets/assets/000/080/428/medium640thumb/leds_hero-loop.jpg?1567604645)

![leds_hero-sil.jpg](https://cdn-learn.adafruit.com/assets/assets/000/080/429/medium640/leds_hero-sil.jpg?1567605082)


## Featured Products

### Flexible Silicone Neon-like Skinny NeoPixel LED Strip

[Flexible Silicone Neon-like Skinny NeoPixel LED Strip](https://www.adafruit.com/product/4310)
You love NeoPixels, and you love silicone diffusion? Peep this&nbsp; **Flexible Silicone Neon-like Skinny NeoPixel LED Strip**! OK it's a bit of a mouthful, but check out the beautiful footage! It&nbsp;_looks_&nbsp;a lot like a slim strip of neon, but without the need...

In Stock
[Buy Now](https://www.adafruit.com/product/4310)
[Related Guides to the Product](https://learn.adafruit.com/products/4310/guides)
### Adafruit NeoPixel LED Side Light Strip - Black 90 LED

[Adafruit NeoPixel LED Side Light Strip - Black 90 LED](https://www.adafruit.com/product/3635)
Fancy new _side light_ LED strips are a great alternative for folks who have loved and used Adafruit LED strips for a few years but want gorgeous, glowy&nbsp;light emitting at 90 degrees. They're very skinny so you can run them along a thin edge and curve them around shapes and...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3635)
[Related Guides to the Product](https://learn.adafruit.com/products/3635/guides)
### Adafruit NeoPixel LED Side Light Strip - Black 60 LED

[Adafruit NeoPixel LED Side Light Strip - Black 60 LED](https://www.adafruit.com/product/3636)
Fancy new _side light_ LED strips are a great alternative for folks who have loved and used Adafruit LED strips for a few years but want gorgeous, glowy&nbsp;light emitting at 90 degrees. They're very skinny so you can run them along a thin edge and curve them around shapes and...

In Stock
[Buy Now](https://www.adafruit.com/product/3636)
[Related Guides to the Product](https://learn.adafruit.com/products/3636/guides)
### Adafruit GEMMA M0 - Miniature wearable electronic platform

[Adafruit GEMMA M0 - Miniature wearable electronic platform](https://www.adafruit.com/product/3501)
The **Adafruit Gemma M0** is a super small microcontroller board, with just enough built-in to create many simple projects. It may look small and cute: round, about the size of a quarter, with friendly alligator-clip sew pads. But do not be fooled! The Gemma M0 is incredibly...

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

[Tilt ball switch](https://www.adafruit.com/product/173)
The "poor man's" accelerometer! Tilt sensors are switches that can detect basic motion/orientation. The metal tube has a little metal ball that rolls around in it, when its tilted upright, the ball rolls onto the contacts sticking out of end and shorts them together.

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/173)
[Related Guides to the Product](https://learn.adafruit.com/products/173/guides)
### Breadboard-friendly SPDT Slide Switch

[Breadboard-friendly SPDT Slide Switch](https://www.adafruit.com/product/805)
These nice switches are perfect for use with breadboard and perfboard projects. They have 0.1" spacing and snap in nicely into a solderless breadboard. They're easy to switch no matter what size fingers you have, but not so easy that they'll get flipped by accident. Work great as...

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

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

In Stock
[Buy Now](https://www.adafruit.com/product/1578)
[Related Guides to the Product](https://learn.adafruit.com/products/1578/guides)
### JST-PH Battery Extension Cable - 500mm

[JST-PH Battery Extension Cable - 500mm](https://www.adafruit.com/product/1131)
By popular demand, we now have a handy extension cord for all of our JST PH-terminated battery packs (such as our LiIon/LiPoly and 3xAAA holders). One end has a JST-PH compatible socket, and the other end has a matching plug. Between the two, 500mm of color coded wire. Handy for wearable...

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

## Related Guides

- [Adafruit Trinket M0](https://learn.adafruit.com/adafruit-trinket-m0-circuitpython-arduino.md)
- [Phantom Mouse Jiggler](https://learn.adafruit.com/phantom-mouse-jiggler.md)
- [Sensor Plotting with Mu and CircuitPython](https://learn.adafruit.com/sensor-plotting-with-mu-and-circuitpython.md)
- [Glowing Fascinator Hat with Gemma M0 and MakeCode](https://learn.adafruit.com/glowing-fascinator-hat-gemma-m0-makecode.md)
- [Using MCP23008 & MCP23017 with CircuitPython](https://learn.adafruit.com/using-mcp23008-mcp23017-with-circuitpython.md)
- [Adafruit Gemma M0](https://learn.adafruit.com/adafruit-gemma-m0.md)
- [Using DS18B20 Temperature Sensor with CircuitPython](https://learn.adafruit.com/using-ds18b20-temperature-sensor-with-circuitpython.md)
- [Proximity Based Lighting](https://learn.adafruit.com/proximity-based-lighting.md)
- [NeoPixel Basketball Hoop](https://learn.adafruit.com/neopixel-mini-basketball-hoop.md)
- [Water Drip Dress with Oozemaster 3000](https://learn.adafruit.com/water-drip-dress-with-oozemaster-3000.md)
- [Mystical LED Halloween Hood](https://learn.adafruit.com/mystical-led-halloween-hood.md)
- [Building the Assistive Technology Ultimate Remote](https://learn.adafruit.com/building-the-assistive-technology-ultimate-remote.md)
- [CircuitPython Hardware: LED Backpacks & FeatherWings](https://learn.adafruit.com/micropython-hardware-led-backpacks-and-featherwings.md)
- [Melting Picture Frame for PyPortal IoT images](https://learn.adafruit.com/pyportal-art-display.md)
- [3D Printed Daft Punk Helmet](https://learn.adafruit.com/3d-printed-daft-punk-helmet.md)
- [CircuitPython Hardware: SSD1306 OLED Display](https://learn.adafruit.com/micropython-hardware-ssd1306-oled-display.md)
