It's the holidays and you need a colorful snowglobe to cheer up. No worries, MakeCode and Adafruit Circuit Playground Express are here to cheer you up.

In this project, we will use the 10 NeoPixels of the Circuit Playground Express to light up a DIY snowglobe. For the body of the globe we'll use an every day mason jar, you can find these in your hardware or grocery store.

Sounds simple? Let's do it.


Pick a jar and an extra lid to build the snow globe. The extra lid should be large enough to hold the Circuit Playground Express. You will also need a tool to cut into the lid and a glue gun.

Building the base

Place the Circuit Playground Express inside the lid and mark both sides for the JST and USB connectors. Cut out openings and make sure you can squeeze the cables in. The lid will sit under the jar which will keep the CPX nicely away from the water.

Connect the globe

Build your favorite snow globe using one of the gazillion tutorial online. I just used water, gliceryn and glitter. When you're done, use glue to secure the lib to the bottom.


Once the glue is solidified, you can carefully "unplug" it from the lid. It is now molded/casted to the lid and easily sits on it. Since water and electronics don't work well together, it's easier to keep the Circuit Playground Express while working on the liquid part of the globe...

Pro tip: Automatic stirring

Dip a Playmobil underwater motor in your globe to keep these glitter particles moving!

An easy way to get started is to run a bunch of animation in a forever loop. Go to and drag various animations from the LIGHT drawer. Download the code to your board and voila!

We would like to be able to turn on and off the light easily. The board is tucked under the globe so buttons or gestures are not really doable... which leaves us with the microphone!!!

Using the on loud sound, we switch the animation on and off. We use a variable on to keep track of the animation state (true = on, false = off).

When the variable on turns false, we cancel the current animation and clear the LEDs. The forever loop keeps running in the background but only animations when on is true.

This guide was first published on Dec 13, 2017. It was last updated on Mar 08, 2024.