Snow globe intruder alert system

Marwan Al-Sabbagh (~marwan)




Learn how to build a snow globe that sounds an alarm and flashes a red alert when intruders are about. Me and my six year old daughter designed and built this project to have fun with friends and learn a bit about computers along the way.

Adafruit’s Circuit Playground Express is a fantastic $25 computer packed with sensors, buttons, LEDs and a little speaker. Add this DIY Snow Globe Kit and some Conductive Thread and we have the makings of an ingenious Snow globe intruder alert system. All written in python using a simple text editor without the need for any special software, drivers or soldering.

The globe has a rainbow mode that randomly fades different colors in and out and an alarm mode to detect intruders. Modes can be switched by giving the globe a tap which it detects with it’s motion sensors. Once in alarm mode the globe will flash green until an intruder steps on the conductive thread which will sound the alarm and flash the globe red.

The Circuit Playground was used to teach my six year old daughter the differences between computer inputs and outputs and how to issue commands to computers using the Python REPL. She learned about the different frequencies of sound waves by calling the beep function with different frequencies. This opened up the topic of the hearing range of humans compared to other animals like dogs. She then learned to set the color of each of the ten NeoPixel LEDs into a rainbow pattern by calling the light function multiple times with each color and position. We explored how any color can be displayed as a combination of red, green and blue by using a digital microscope to see these three LEDs change with different colors.

This talk will cover:

  1. Tour of the Circuit Playground Express
  2. Assembling the snow globe
  3. The rainbow and alarm code
  4. REPL sound and light with a six year old
  5. Troubleshooting tips


Basic exposure to python.

Content URLs:

Details of this talk can be found on my website.

This talk was previously given at PyLondinium 2018

slides on speakerdeck

Speaker Info:

I'm a passionate Python developer living on the sunny island of Bahrain. I've been a speaker at Python conferences before and ran the Bahrain Linux User Group for five years. During that period I was a regular speaker at the groups monthly meetups. I’ve taught courses in python programing and computer networking to both students and working professionals.

Id: 935
Section: Embedded python
Type: Talks
Target Audience: Beginner
Last Updated: