The best tools to make your project dreams come true

Login or Signup

By Adafruit Industries

Mason Jar Snow Globe

Courtesy of Adafruit Industries

Shiny Snow Globe!

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 snow globe. For the body of the globe, we'll use an everyday 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.

Building the base

Connect the globe

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


Connect the globe


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!

Light show

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!

Copy Code
loops.forever(function () {
light.showAnimation(light.rainbowAnimation, 2000)
light.showAnimation(light.runningLightsAnimation, 2000)
light.showAnimation(light.cometAnimation, 2000)
light.showAnimation(light.sparkleAnimation, 2000)
light.showAnimation(light.colorWipeAnimation, 2000)
light.showAnimation(light.theaterChaseAnimation, 2000)

Clap clap

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.

Copy Code
let on = false
input.onLoudSound(function () {
on = !(on)
if (!(on)) {
on = true
loops.forever(function () {
if (on) {
light.showAnimation(light.rainbowAnimation, 500)

Key Parts and Components

Add all Digi-Key Parts to Cart
  • 1528-2280-ND
  • 1528-2282-ND