No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


a snow globe that detects intruders

snow globe


Plug in the Circuit Playground Express into your USB port. Then copy over the file.


Use the Slide switch to change between rainbow and alarm mode. When in alarm mode if the A2 sensor detects a touch an alarm will sound with flashing red LED lights.


Copy over to the Circuit Playground to make it easier for students to control the speaker and leds from the REPL. Below is an example session.

>>> from teach import cpx, beep, led
>>> # make speaker beep
>>> beep()
>>> # make speaker beep at 800Hz 
>>> beep(800)
>>> # reduce brightness to a lower more comfortable level
>>> cpx.pixels.brightness = 0.02
>>> # set first LED to white
>>> led()
>>> # set second LED to red
>>> led('red', 1)
>>> # set first LED to blue with hex color code
>>> led('0000ff')
>>> # set first LED to Magenta(red on, green off, blue on)
>>> led('101')


intruder alert


The photo below shows the NeoPixel under a digital microscope with a magnification of 200x. The separate red, green and blue LEDs are clearly visible.

NeoPixel microscope