# UFO Flying Saucer with Circuit Playground Express

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/047/546/medium800/projects_beautyUFO.jpg?1508882086)

The aliens are coming!! The aliens are coming!! Oh, wow, and they've&nbsp;got a really nifty flying saucer, with lights and otherworldly sounds!

Have you ever wanted to make your own prop UFO model with lights and sounds that react to the tilt of the craft? Me too! Plus, you can hang it from a piece of fishing line and make your own sci fi B-movie special effects!

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

![](https://cdn-learn.adafruit.com/assets/assets/000/047/547/medium800/projects_ufosky.jpeg?1508882101)

You can build your own flying saucer using paper plates, or 3D print a model, or even modify a plastic model kit. You'll just need a hole in the bottom for the Circuit Playground Express's NeoPixel LED lights to show, and room for the battery pack inside.

You'll also want to get a small, clear plastic drinking cup to use as a tractor beam and stand to display your UFO, as well as some optional sandpaper to scuff up the interior of the cup.

![](https://cdn-learn.adafruit.com/assets/assets/000/047/548/medium800/projects_PA230232_2k.jpg?1508882182)

![](https://cdn-learn.adafruit.com/assets/assets/000/047/549/medium800/projects_PA230233_2k.jpg?1508882199)

![](https://cdn-learn.adafruit.com/assets/assets/000/047/550/medium800/projects_PA230337_2k.jpg?1508882216)

### Part: Circuit Playground Express
quantity: 1
Awesome microcontroller board packed with features!
[Circuit Playground Express](https://www.adafruit.com/product/3333)

### Part: 3x AAA Battery Holder
quantity: 1
With on/off switch
[3x AAA Battery Holder](https://www.adafruit.com/product/727)

Check out&nbsp;this John Park's Workshop&nbsp;LIVE episode for more info and a flying saucer 3D modeling session!

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

# UFO Flying Saucer with Circuit Playground Express

## Code the UFO with CircuitPython

The Circuit Playground Express has all the features you'll need to make a great, reactive light and sound effects pack for your flying saucer. And, coding it all in CircuitPython is straightforward and uses high level commands to make things simple.

We'll use the built in accelerometer to measure the orientation of the board, and then use those readings to effect the light colors, the pitch of the sounds, and the speed of the light/sound cycle.

For example, we can have it make faster, higher pitched sounds when tilted, and then slow down and lower the tones when the craft is level. This is usually when the aliens do all of their abductions of cows and otherwise peaceful citizens, BTW.

![](https://cdn-learn.adafruit.com/assets/assets/000/047/551/medium800/projects_PA230238_2k.jpg?1508882293)

The Circuit Playground Express can be used with three different programming methods: CircuitPython, Arduino, and Make:Code. For this project we'll use CircuitPython.

Make sure&nbsp;know how to set up your Circuit Playground Express&nbsp; for use with CircuitPython by following [this guide](https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-quickstart).&nbsp;

Once you've installed the latest version of CircuitPython for Circuit Playground Express from [here](https://github.com/adafruit/circuitpython/releases/latest) and the library bundle from [here](https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/latest), (be sure to unzip it and replace the **lib** folder on your CIRCUITPY drive with the new one from the bundle) you're&nbsp;ready!

Now, you're can to add&nbsp;a small CircuitPython script to tell the board what to do! Copy the code from the section below, then paste it into a new document in your favorite code/text editor.

With your Circuit Playground Express plugged in, you'll see a&nbsp;drive on your computer called CIRCUITPY. Save the file to this drive as **main.py**.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/ufo/code.py

Now, try tilting your board. You'll see that it doesn't do anything while it is right side up, with the board facing the ceiling. But once you tilt it beyond 90 degrees to point it toward the ground, the lights will start to cycle and the sound effects will begin to play!

Notice how different angles create different colors, sound pitches, and frequency of the effects.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/047/552/medium800thumb/projects_tiltCPXUFO.jpg?1508882610)

Info: 

Now, it's time to package your lights and sounds inside a UFO!

# UFO Flying Saucer with Circuit Playground Express

## Build the Flying Saucer

You have a few options for making your flying saucer. Paper plates, pie tins, frisbees, hubcaps, and more&nbsp;can be excellent starting points.

- Cut&nbsp;a hole for the battery connector in the bottom plate
- Pass the cable through to connect to the Circuit Playground Express's JST battery&nbsp;jack
- Tape the Circuit Playground Express to the bottom of your saucer
- Tape the battery box inside the plate

![projects_PA230262_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/553/medium640/projects_PA230262_2k.jpg?1508882706)

![projects_PA230264_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/554/medium640/projects_PA230264_2k.jpg?1508882716)

![projects_PA230266_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/555/medium640/projects_PA230266_2k.jpg?1508882729)

![projects_PA230268_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/556/medium640/projects_PA230268_2k.jpg?1508882743)

![projects_PA230271_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/557/medium640/projects_PA230271_2k.jpg?1508882751)

- Cut a hole in the center of the top plate, so you can still access the battery box's on/off switch
- Connect the plate halves together with tape or staples
- Cover the hole with the "cockpit" of your UFO, such as a disposable coffee cup lid, and tape it in place with a hinge-like strip of tape

![projects_PA230287_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/558/medium640/projects_PA230287_2k.jpg?1508882870)

![projects_PA230288_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/559/medium640/projects_PA230288_2k.jpg?1508882877)

![projects_PA230292_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/560/medium640/projects_PA230292_2k.jpg?1508882931)

![projects_PA230295_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/561/medium640/projects_PA230295_2k.jpg?1508882965)

![projects_PA230299_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/562/medium640/projects_PA230299_2k.jpg?1508882978)

Now, you can test out your UFO! As you rotate and tilt it, you'll hear the different pitches, see the varying light colors, and the overall frequency of the cycle with change!

![projects_PA230301_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/564/medium640/projects_PA230301_2k.jpg?1508883055)

![projects_PA230305_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/565/medium640/projects_PA230305_2k.jpg?1508883062)

For the tractor beam that's used for farm animal abductions, you can use a clear plastic drinking cup. By scuffing up the inside of the cup with some sandpaper, you can create a nice diffusion that will showcase the great lighting effects!

![projects_PA230308_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/567/medium640/projects_PA230308_2k.jpg?1508883224)

![projects_PA230309_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/568/medium640/projects_PA230309_2k.jpg?1508883239)

![projects_PA230311_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/569/medium640/projects_PA230311_2k.jpg?1508883246)

![projects_PA230312_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/570/medium640/projects_PA230312_2k.jpg?1508883255)

Land the UFO on your tractor beam to see the great lighting effect!

![](https://cdn-learn.adafruit.com/assets/assets/000/047/573/medium800/projects_PA230315_2k.jpg?1508883318)

Or, you can 3D print the model linked below. You'll need some 2.5mm nylon screws and nuts to fasten the model halves together.

[cpxUFO_top.stl](https://cdn-learn.adafruit.com/assets/assets/000/047/578/original/cpxUFO_top.stl?1508883706)
[cpxUFO_bottom.stl](https://cdn-learn.adafruit.com/assets/assets/000/047/579/original/cpxUFO_bottom.stl?1508883714)
- Depending on your printer, you may be able to print the top and bottom sections intact (as seen in the second image here) or in halves for joining
- Place the Circuit Playground Express inside the saucer, facing down, and use tape to secure it and the battery pack
- Assemble the top and bottom, being sure to rotate the upper section before screwing in the screws and nuts to hold it all together if you printed each section in halves
- There will be a large, obvious seam, but that's part of the fun with this B-grade sci-fi film look!

![projects_PA230338_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/574/medium640/projects_PA230338_2k.jpg?1508883365)

![projects_PA230339_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/575/medium640/projects_PA230339_2k.jpg?1508883506)

![projects_PA230342_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/576/medium640/projects_PA230342_2k.jpg?1508883515)

![projects_PA230344_2k.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/577/medium640/projects_PA230344_2k.jpg?1508883527)

![](https://cdn-learn.adafruit.com/assets/assets/000/047/581/medium800/projects_PA230362_2k.jpg?1508883856)

![](https://cdn-learn.adafruit.com/assets/assets/000/047/582/medium800/projects_PA230359_2k.jpg?1508883871)

![](https://cdn-learn.adafruit.com/assets/assets/000/047/580/medium800/projects_PA230355_2k.jpg?1508883842)

![](https://cdn-learn.adafruit.com/assets/assets/000/047/583/medium800/projects_PA230374_2k.jpg?1508883892)

You can also find some excellent plastic model kits at hobby shops and online. Then, you can use your imagination and creativity to modify the model kit to fit your Circuit Playground Express and battery pack.


## Featured Products

### 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...

In Stock
[Buy Now](https://www.adafruit.com/product/3333)
[Related Guides to the Product](https://learn.adafruit.com/products/3333/guides)
### 3 x AAA Battery Holder with On/Off Switch and 2-Pin JST

[3 x AAA Battery Holder with On/Off Switch and 2-Pin JST](https://www.adafruit.com/product/727)
This battery holder connects 3 AAA batteries together in series for powering all kinds of projects. We spec'd these out because the box is slim, and 3 AAA's add up to about 3.3-4.5V, a very similar range to Lithium Ion/polymer (Li-Ion) batteries and have an on-off switch. That makes...

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

## Related Guides

- [Adafruit Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express.md)
- [Glowing Lotus Flower - Electronic Origami for Beginners](https://learn.adafruit.com/glowing-lotus-flower-electronic-origami-for-beginners.md)
- [Circuit Playground Express USB MIDI Controller and Synthesizer](https://learn.adafruit.com/cpx-midi-controller.md)
- [Giant Mechanical Keyboard](https://learn.adafruit.com/giant-control-alt-delete.md)
- [What is Web MIDI & BLE MIDI?](https://learn.adafruit.com/web-ble-midi.md)
- [Mount for CRICKIT](https://learn.adafruit.com/mount-for-crickit.md)
- [Make It Switch](https://learn.adafruit.com/make-it-switch.md)
- [Circuit Playground Seashell Pendant](https://learn.adafruit.com/circuit-playground-seashell-pendant.md)
- [Circuit Playground Digital Input](https://learn.adafruit.com/circuit-playground-digital-input.md)
- [Motion Gift Box](https://learn.adafruit.com/motion-gift-box.md)
- [Music Box with Dancing Adabot](https://learn.adafruit.com/music-box-with-circuit-python.md)
- [CircuitPython Hardware: ILI9341 TFT & FeatherWing](https://learn.adafruit.com/micropython-hardware-ili9341-tft-and-featherwing.md)
- [Circuit Playground Bike Glove](https://learn.adafruit.com/circuit-playground-bike-glove.md)
- [FLORAbrella](https://learn.adafruit.com/florabrella.md)
- [Custom Controllers for MakeCode Arcade](https://learn.adafruit.com/custom-controllers-for-makecode-arcade.md)
- [Qu'est-ce que MakeCode?](https://learn.adafruit.com/makecode-fr.md)
