# Make a Snow Globe with Circuit Playground Express & MakeCode

## Introduction

Although people may have mixed feelings about snow, I think we can all agree that snow globes are pretty sweet. You can make one that’s even sweeter than the average globe using a Circuit Playground Express board and [MakeCode](https://makecode.adafruit.com/) to have a musical NeoPixel orb of holiday fun!

The Circuit Playground Express is a great board for this project since it has so many modules that you can control without any extra wiring. It’s also the perfect form factor to hide away snuggly in the base of your snow globe along with a battery to keep the fun powered on.

You can write code to easily control these modules with [MakeCode](https://makecode.adafruit.com/), a visual coding app from Microsoft. MakeCode uses drag and drop blocks, like Scratch, to code rather than typing in a coding language. Of course, you can also use JavaScript with MakeCode as well if you really want to give your keyboard a workout.

The following product is a complete kit with the Circuit Playground Express, battery, charger, and globe:

Featured
### Circuit Playground Snow Globe Kit

[Circuit Playground Snow Globe Kit](https://www.adafruit.com/product/4011)
Light up the winter nights this year with an electronic Snow Globe! This kit provides everything you need to make your very own, **no soldering required!** You can use MakeCode to program various light and sound effects into the Circuit Playground Express. MakeCode uses...

In Stock
[Buy Now](https://www.adafruit.com/product/4011)
[Related Guides to the Product](https://learn.adafruit.com/products/4011/guides)
![Snow globe with sparkly flakes swirling around, a ring of RGB LEDs in the base animate in a rainbow swirl.](https://cdn-shop.adafruit.com/product-videos/640x480/4011-00.jpg)

If you just need some of these parts, they are listed separately below. You do **not** need to buy the kit above and the items below.

### Circuit Playground Express

[Circuit Playground Express](https://www.adafruit.com/product/3333)
 **Circuit Playground Express** is the next step towards a perfect introduction to electronics and programming. We've taken the original Circuit Playground Classic and made it even better! Not only did we pack even more sensors in, we also made it even easier to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3333)
[Related Guides to the Product](https://learn.adafruit.com/products/3333/guides)
![A Black woman's manicured hand holds a round microcontroller with lit up LEDs.](https://cdn-shop.adafruit.com/640x480/3333-05.jpg)

### DIY Snow Globe Kit

[DIY Snow Globe Kit](https://www.adafruit.com/product/3722)
Not merely a snow globe, but a _show_ globe! This custom container is durable, clear and round, with a large flat screw-on top and a press-fit rubber stopper. The stopper makes a nice seal, and is also _hollow_ which means you can put (you guessed it...) electronics inside! This...

In Stock
[Buy Now](https://www.adafruit.com/product/3722)
[Related Guides to the Product](https://learn.adafruit.com/products/3722/guides)
![Red polished hand turning an Assembled snow globe kit with glowing electronics and friendly robot inside upside down and placing it back down. ](https://cdn-shop.adafruit.com/product-videos/640x480/3722-04.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)

### Adafruit Micro Lipo - USB LiIon/LiPoly charger

[Adafruit Micro Lipo - USB LiIon/LiPoly charger](https://www.adafruit.com/product/1304)
Oh so adorable, this is the tiniest little lipo charger, so handy you can keep it any project box! Its also easy to use. Simply plug in the gold plated contacts into any USB port and a 3.7V/4.2V lithium polymer or lithium ion rechargeable battery into the JST plug on the other end. There are...

In Stock
[Buy Now](https://www.adafruit.com/product/1304)
[Related Guides to the Product](https://learn.adafruit.com/products/1304/guides)
![Top view of Adafruit Micro Lipo - USB LiIon/LiPoly charger - v1 above a 2-pin JST cable.](https://cdn-shop.adafruit.com/640x480/1304-06.jpg)

https://www.youtube.com/watch?v=v6yhW7GnTvk

# Make a Snow Globe with Circuit Playground Express & MakeCode

## Programming with MakeCode

For this project, I’m using the accelerometer, speaker and ring of NeoPixels on the Circuit Playground Express. I have the code running so that when you shake the Circuit Playground, the NeoPixels animate in the rainbow effect and it plays some music.

![](https://cdn-learn.adafruit.com/assets/assets/000/049/246/medium800/makecode_makeCodeSS.jpg?1513171537)

It’s fairly easy to program music into a project with MakeCode. You use the note blocks to select your note and how many beats you want the note to play for. There’s even a small piano keyboard that opens up with it if you want to write your own music on the fly. To have the NeoPixels change with the music, I have the animation advancing by one frame after each note is played. The music and NeoPixel code blocks are nested in a function box called “playMusic” so that I can put a function block inside of the “On Shake” block. This tells the Circuit Playground to play the music and light up the lights every time its shaken.

https://makecode.adafruit.com/65019-70628-39914-53641

[Link to download the exported .uf2 MakeCode ](https://github.com/BlitzCityDIY/Peanuts-Snow-Globe/blob/master/circuitplayground-peanutsSnowGlobeFinal.uf2)
# Make a Snow Globe with Circuit Playground Express & MakeCode

## Snow Globe Assembly Prep

After you have your code written, it’s time to tackle the making of the snow globe.

You’ll need:

- An empty snow globe
- A figurine or small plastic item
- Distilled water
- Glue (E6000 is good choice)
- Envirotex
- Glycerin
- Glitter

![](https://cdn-learn.adafruit.com/assets/assets/000/049/247/medium800/makecode_P1020596.jpg?1513172094)

Warning: 

Your first step is to glue your special item that will be on display in your snow globe onto the inner base of snow globe using the E6000 glue. I recommend letting it set for 24 hours at least. You want to make sure that your item is secure and that the glue won’t be affected by the water or other ingredients.

![makecode_edited_P1020602.jpg](https://cdn-learn.adafruit.com/assets/assets/000/049/249/medium640/makecode_edited_P1020602.jpg?1513172237)

After your glue has permanently stuck your item, it’s time to seal it and the base to ensure that it will survive the water, glycerin and glitter (if you’re feeling brave). I used Envirotex, which is a resin-based water proof seal that was recommended in the directions that came with my empty snow globe.

If you do decide to use the sealer, please follow the directions closely on the packaging to stay safe and to also have a successful project. I recommend mixing any of these concoctions in disposable containers with something like a popsicle stick to keep clean-up simple.

Depending on your chosen resin, dry times may vary. Mine was recommended to set for eight hours but I ended up letting it sit for 24 hours to ensure that everything was at optimal seal.

![makecode_edited_P1020604.jpg](https://cdn-learn.adafruit.com/assets/assets/000/049/250/medium640/makecode_edited_P1020604.jpg?1513172383)

![makecode_edited_P1020606.jpg](https://cdn-learn.adafruit.com/assets/assets/000/049/251/medium640/makecode_edited_P1020606.jpg?1513172409)

![](https://cdn-learn.adafruit.com/assets/assets/000/049/252/medium800/makecode_edited_P1020608.jpg?1513172443 How it looks after 24 hours of setup)

# Make a Snow Globe with Circuit Playground Express & MakeCode

## Putting It All Together

Once that step is all set though, it’s time to assemble the globe!

With your glued item and base at the ready, balance the globe portion with the opening up so that you can begin adding the distilled water. To account for the displacement from your item, I recommend filling the globe about halfway and then putting the base in to see how it affects the water level so that you don’t accidentally overfill. I would also test again before going for the final fit.

![](https://cdn-learn.adafruit.com/assets/assets/000/049/253/medium800/makecode_edited_P1020609.jpg?1513172684)

When you have a good water level, add the glycerin and glitter. The glycerin adds some thickness to the water that allows the glitter to float a bit better and give the snow globe that dreamy effect. I added about a ½ tsp of glycerin and a few shakes of glitter. Proportions aren’t especially important here though since you can mix to taste but what I did should give you a good baseline. I recommend mixing the water, glycerin and glitter together before the next steps.

After your water concoction is mixed, it’s time for the moment of truth: inserting the base! Squeeze a thin layer of E6000 glue around the sides of the base so that a seal is created for the globe. Then, push the base in slowly, making sure that you’re getting a tight fit. With the globe still upside down, place another line of E6000 glue, this time around the top of the seal to block any possible leaks. This should be left to dry for a few hours, but that time will be worth it if it means no wet electronics.

# Make a Snow Globe with Circuit Playground Express & MakeCode

## Add Electronics & Shake!

![](https://cdn-learn.adafruit.com/assets/assets/000/049/254/medium800/makecode_P1020615.jpg?1513172787)

After that dries, you have a custom DIY snow globe! But, it seems to be missing something…oh that’s right we need to add the electronics!

Grab your programmed Circuit Playground Express and place it into the base of the snow globe so that the NeoPixels are pointing up towards the inside of the globe. Plug a lipo battery into the Circuit Playground’s JST connector for power. Close-up the bottom portion of the snow globe with the screw on base to keep the Circuit Playground nice and snug and then shake away for music, lights and shimmering glitter!


## Guide Products

### Circuit Playground Snow Globe Kit

[Circuit Playground Snow Globe Kit](https://www.adafruit.com/product/4011)
Light up the winter nights this year with an electronic Snow Globe! This kit provides everything you need to make your very own, **no soldering required!** You can use MakeCode to program various light and sound effects into the Circuit Playground Express. MakeCode uses...

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

[Circuit Playground Express](https://www.adafruit.com/product/3333)
 **Circuit Playground Express** is the next step towards a perfect introduction to electronics and programming. We've taken the original Circuit Playground Classic and made it even better! Not only did we pack even more sensors in, we also made it even easier to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3333)
[Related Guides to the Product](https://learn.adafruit.com/products/3333/guides)
### DIY Snow Globe Kit

[DIY Snow Globe Kit](https://www.adafruit.com/product/3722)
Not merely a snow globe, but a _show_ globe! This custom container is durable, clear and round, with a large flat screw-on top and a press-fit rubber stopper. The stopper makes a nice seal, and is also _hollow_ which means you can put (you guessed it...) electronics inside! This...

In Stock
[Buy Now](https://www.adafruit.com/product/3722)
[Related Guides to the Product](https://learn.adafruit.com/products/3722/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)
### Adafruit Micro Lipo - USB LiIon/LiPoly charger

[Adafruit Micro Lipo - USB LiIon/LiPoly charger](https://www.adafruit.com/product/1304)
Oh so adorable, this is the tiniest little lipo charger, so handy you can keep it any project box! Its also easy to use. Simply plug in the gold plated contacts into any USB port and a 3.7V/4.2V lithium polymer or lithium ion rechargeable battery into the JST plug on the other end. There are...

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

## Related Guides

- [Adafruit Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express.md)
- [Glowing Fascinator Hat with Gemma M0 and MakeCode](https://learn.adafruit.com/glowing-fascinator-hat-gemma-m0-makecode.md)
- [HalloWing Light Paintstick](https://learn.adafruit.com/hallowing-light-paintstick.md)
- [NeoPixels with MakeCode](https://learn.adafruit.com/neopixels-with-makecode.md)
- [Chinese Dragon Puppet with Motion-Reactive Flame Effect](https://learn.adafruit.com/chinese-dragon-puppet-with-motion-reactive-flame-effect.md)
- [The Scream: Interactive Screaming Painting](https://learn.adafruit.com/the-scream-munch-screaming-interactive-scream-painting.md)
- [Best Beginner Boards for Teachers](https://learn.adafruit.com/best-beginner-boards-for-teachers.md)
- [Guardian Robot – Zelda BOTW](https://learn.adafruit.com/guardian-robot-zelda-botw.md)
- [AtariFruit 2600 Joystick](https://learn.adafruit.com/atarifruit-2600-joystick.md)
- [Motion Gift Box](https://learn.adafruit.com/motion-gift-box.md)
- [Snow Globe with Circuit Playground Bluefruit](https://learn.adafruit.com/snow-globe-bluefruit-cpb.md)
- [Cartoon Network MakeCode: Garnet's Palm Gems from Steven Universe](https://learn.adafruit.com/cartoon-network-makecode-garnet-s-palm-gems-from-steven-universe.md)
- [Which CircuitPython Board is Right for You?](https://learn.adafruit.com/choose-your-circuitpython-board.md)
- [Motorized Marble Machine](https://learn.adafruit.com/marble-run.md)
- [Cardboard Box for Circuit Playground Express](https://learn.adafruit.com/cardboard-box-for-circuit-playground-express.md)
- [Automatic Cat Treat Dispenser](https://learn.adafruit.com/automatic-cat-treat-dispenser.md)
