Give the gift of curiosity this year with a Circuit Playground Express. The young imagineer in your home will be delighted to wake up on Christmas morning and find a brand new Christmas stocking that sings her favorite Christmas songs and lights up in her favorite colors. 

This is a great project to do with kids, or to make on your own to surprise them Christmas morning. There is no sewing or soldering required, and the code is easy to create and customize using the MakeCode drag-and-drop code editor.

Add some batteries, and watch their eyes light up when they see what Santa brought.


A Black woman's manicured hand holds a round microcontroller with lit up LEDs.
Circuit Playground Express is the next step towards a perfect introduction to electronics and programming. We've taken the original Circuit Playground Classic and...
Out of Stock
Front angled shot of 3 x AAA battery holder with on-off switch and 2-pin JST PH connector.
This battery holder connects 3 AAA batteries together in series for powering all kinds of projects. We spec'd these out because the box is slim, and 3 AAA's add up to about...
In Stock
Angled shot of 3 PKcell AAA batteries.
Battery power for your portable project! These batteries are good quality at a good price, and work fantastic with any of the kits or projects in the shop that use AAA's. This is a...
In Stock
Fully Reversible Pink/Purple USB A to micro B Cable
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also fully reversible! That's right, you will save seconds a day by...
In Stock

Additional Materials Needed

  • A Christmas stocking
  • Craft Foam in white, black and sparkly 
  • Ziploc sandwich bag
  • Sticky-back velcro square
  • Scissors 
  • Hot glue gun
  • Glitter glue, ribbons, jewels, and embellishments

The Circuit Playground Express can be programmed a number of ways: it will run Arduino code, CircuitPython, or you can program it with MakeCode.  

Microsoft MakeCode for Adafruit is a web-based code editor for physical computing. It provides a block editor, similar to Scratch or, and also a JavaScript editor for more advanced users. 

This means you can drag and drop light animations and functionality using the Circuit Playground Express' onboard sensors without ever writing a single line of code. Just snap the blocks together and watch your lights dance.

For this project, I used the Circuit Playground's onboard lights to run a pretty rainbow color animation and the onboard speaker to play Jingle Bells every time a button is pressed. The colors and sounds are easy to customize to play your favorite Holiday song.

Go to and select "New Project".

Give it a name. I called mine "Unicorn Stocking." 

First we'll add the light animation. Click the LIGHT tab and drag an instance of show animation for 500 ms into your workspace, and drop it inside the forever loop that's already on the desktop. (If it's not there, you can find it under the LOOPS tab). 

Anything placed inside this block will run over and over, forever.

Check out the simulator on the left side of the screen. Are the lights animating rainbow? That means you've done it right. This is easy.

Now we'll add music that plays when the button on the face of the Circuit Playground is pressed. The buttons or sensors are accessed under the INPUT tab.

Drag an instance of on button A click from the INPUT tab into the workspace. Anything inside this block will run whenever the A button (or whatever input you choose) is clicked.

While you're here, take a look under the dropdowns to see all the different input options you've got. I kept it simple using button A, but you can trigger your code with any of these inputs just by selecting them.

Choose the MUSIC tab and drag an instance of play melody at tempo into your on button A loop. 

Click the music note and the editor window will appear. Choose your first melody note from the first column, the second from the second column, etc. For a rest note, leave the column blank.

Jingle Bells starts on the third of its key, so it will work out best if you voice it as shown. Each play melody block will play up to 8 notes, but you can copy and paste the block inside the on button A loop until you have as many lines as you'd like.

Click the A button in the simulator to hear your melody played back. I found 120 bpm to be a bit slow and dirge-like, so I sped up my tempo to 200 bpm, which is a bit more cheerful.

There are more tools available under the MUSIC tab that will allow you more control -- play around with them until you're happy with your composition. 

Download the Code

  1. Plug your Circuit Playground Express into your computer with a USB cable. 
  2. Click the reset button. 
  3. Green lights will appear on the Circuit Playground's face  and it will appear in your list of devices, called CPLAYBOOT

If you don't see this or get a drive called CIRCUITPY, try double-clicking the reset button instead of single-clicking to get to a drive named CPLAYBOOT. Putting code on a CIRCUITPY drive will not program it.

Click the pink Download button on your MakeCode screen and the code you just made will download to your computer.  Drag it onto the CPLAYBOOT device.  

If all goes well, you will see a pretty rainbow animation.  Click the A button and the Circuit Playground's tiny onboard speaker will play Jingle Bells. Hooray!

Here's the completed project that you can play with directly.

Stick the Circuit Playground to the front of the battery case (the side with the on/off switch) using sticky back velcro. This way it's easy to remove and use again later on in a different project.

We'll use a ziploc bag to make a clear pocket for the Circuit Playground and battery case. I didn't have one of the right size, so I cut one down and glued the left side closed with hot glue. Leave the top open. You want it to fit fairly snugly so it doesn't wiggle around too much.

Use a couple safety pins to pin your ziploc pocket to the front of the stocking. Make sure not to pin all the way through both sides of the stocking or you won't be able to fit the presents inside.


I want the Circuit Playground Express to land right behind the unicorn's eye. It's a good idea to cut your shapes out of paper first to make sure you've got your sizes right and that you're happy with placement. Here is the basic shape of the unicorn's head, with a large eye centered right on the middle of the stocking.

Cut the head shape from white craft foam and the horn shape from sparkly craft foam in the color of your choice. Cut a small pupil and some fluttery eyelashes from black craft foam.

Feel free to download and trace my head shape -- the grid in the photo is 1" squares, for size reference. Or draw your own unicorn shape! Your inner unicorn is beautiful and perfect.

It may also be fun to use your child's drawing as a template - she'll be delighted to see her very own imaginary unicorn come to life.

Use low temperature hot glue to glue the head shape to the ziploc bag pocket, lining up the lights right where you want the eye to be. Glue the horn and eye pieces on in the same manner. I also glued the tip of the horn down to the stocking itself.

For the mane, I am using tubular crin ribbon since it's just so very very sparkly. You can find this at most craft stores. Yarn or ribbons or doll hair would work well here too. I added a zip tie around the strands and looped that over the unicorn's ear, adding judicious dabs of hot glue to hold it in place. If the mane is getting in the unicorn's eyes, you can braid in some ribbons to keep it managed.


Add jewels, glitter glue, or other embellishments to make your unicorn unique and special. Draw on a smile, hang your stocking by the fireplace and fill to overflowing with fun gifts for your young maker.

This guide was first published on Dec 10, 2019. It was last updated on Dec 10, 2019.