# Starduino: 8-Bit Super Mario Tree Topper

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/029/239/medium800thumb/led_pixels_starduinoTopper.jpg?1450745311)

Info: 

Let's build an 8-bit tree topper! This project uses the GEMMA to run a NeoPixel ring stuffed inside a 3D printed Mario star. You start out by printing four star model parts. Then, you'll build and program the circuit. Next comes assembly, and finally you'll power it up and place it atop your tree! (Thanks to [Artie Beavis](https://twitter.com/ArtieBeavis)&nbsp;/&nbsp;[AtmelMakes](https://twitter.com/AtmelMakes) for the name!)

Before you start, you should be familiar with using your 3D printer, and read up on these guides:

- [Introducing GEMMA](../../../introducing-gemma)&nbsp;or [Adafruit Gemma M0](https://learn.adafruit.com/adafruit-gemma-m0/overview)
- [NeoPixel Uberguide](../../../adafruit-neopixel-uberguide)
- [Adafruit Guide to Excellent Soldering](../../../adafruit-guide-excellent-soldering)

&nbsp;You'll need:

- 3D printer, such as [Printrbot](https://www.adafruit.com/products/1760)
- [Translucent filament](https://www.adafruit.com/products/2451)&nbsp;and [black filament](https://www.adafruit.com/products/2060)&nbsp;for 3D printer
- [Adafruit Gemma M0](https://www.adafruit.com/product/3501)&nbsp;or&nbsp;[Adafruit GEMMA v2](https://www.adafruit.com/product/1222)
- RGB [NeoPixel](https://www.adafruit.com/products/1463)&nbsp;LEDs 16 x ring
- Soldering iron and solder
- [Solid core](https://www.adafruit.com/products/1311)&nbsp;or [stranded](https://www.adafruit.com/products/1970)&nbsp;wire (20 to 26 gauge)
- Helping third hand tool
- Wire strippers
- Flush diagonal cutters
- [USB cable](https://www.adafruit.com/products/260)&nbsp;- A/MiniB - 3ft
- 5V 1A USB port [power supply](https://www.adafruit.com/products/501)&nbsp;or USB&nbsp;[battery pack](https://www.adafruit.com/products/1959)

https://youtu.be/5_xMsb2NASo

# Starduino: 8-Bit Super Mario Tree Topper

## Print the Star

Time to heat and squeeze&nbsp;a length&nbsp;of humble, nondescript plastic filament into a delightful, three dimensional object! The model was built in Rhino using NURBS curves, extrusions, and solid booleans. The star has a cylindrical section designed to fit the GEMMA and NeoPixel ring, as well as a slot for the USB cable. The rectangular base piece has a complimentary section as well as posts to snap into the holes in the star once the electronics are in place, and a tubular section that to slide&nbsp;over the top of your tree.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/180/medium800/led_pixels_starduinoRhino.png?1450722570)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/186/medium800/led_pixels_StarduinoRhino02.png?1450724497)

First, you'll need to download the model files from the link below.

[Download STL files](http://www.thingiverse.com/thing:1217163)
Once downloaded, load&nbsp;the first model, StarduinoBody.stl, into CURA or another 3D printer slicer package.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/184/medium800/led_pixels_starduinoBodyCura.png?1450724127)

Adjust the settings to suit your printer -- a fairly low resolution print with 5-10% infill works well. Then, load natural/translucent filament into your printer and print!

![](https://cdn-learn.adafruit.com/assets/assets/000/029/183/medium800/led_pixels_Starduino20.jpg?1450723967)

Next, load the StarduinoBase.stl model and print it with the same settings as the body.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/185/medium800/led_pixels_StarduinoBaseCura.png?1450724191)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/187/medium800/led_pixels_Starduino21.jpg?1450724572)

The final parts to print are the eyes. You may want to switch to black filament for these prints. Or, you may print with the same filament as before and then simply ink the eyes with black permanent marker. You can choose to print one eye at a time or both in one print job.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/189/medium800/led_pixels_StarduinoEyesCura.png?1450724676)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/234/medium800/led_pixels_Starduino19.jpg?1450738455)

Once you've completed making the eyes, go ahead and press fit them into the star.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/192/medium800/led_pixels_Starduino26a.jpg?1450724747)

# Starduino: 8-Bit Super Mario Tree Topper

## Make the Blinky Electronics

Controlling the NeoPixel ring's individual LEDs from the GEMMA is quite simple. Since the NeoPixels are individually addressable, the only connections needed between the ring and the GEMMA are for voltage, ground, and control signal. That's just three wires!

&nbsp;

&nbsp;

Info: 

![](https://cdn-learn.adafruit.com/assets/assets/000/029/220/medium800/led_pixels_starduinoCircuit_bb.png?1450731777)

Cut three short lengths of wire (enamel covered motor wire is used here, but you can use any type that you have handy). Strip a bit off their ends, then solder these connections:

- GEMMA **GND** &nbsp;-\> NeoPixel **Gnd**
- GEMMA **Vout** &nbsp;-\> NeoPixel **Vcc**
- GEMMA&nbsp; **D0** &nbsp;-\> NeoPixel **IN**

![](https://cdn-learn.adafruit.com/assets/assets/000/029/221/medium800/led_pixels_Starduino4.jpg?1450732072)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/223/medium800/led_pixels_Starduino6.jpg?1450732084)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/224/medium800/led_pixels_Starduino7.jpg?1450732099)

Once sodering is completed, bend and tuck the wiring so that the GEMMA fits neatly inside the NeoPixel ring.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/225/medium800/led_pixels_Starduino12.jpg?1450732193)

# Starduino: 8-Bit Super Mario Tree Topper

## Arduino Code

Info: 

To program GEMMA, make sure you have&nbsp;followed the instructions found in&nbsp;[the "Introducing GEMMA" guide](http://learn.adafruit.com/introducing-gemma/setting-up-with-arduino-ide).

Once you've got the GEMMA working, you can play with different example sketches, or code your own blinky pattern.

If you'd like an exciting, fiery pattern to run, download and install the FastLED Arduino library [found here](http://fastled.io), and then copy the following Arduino sketch.

Plug the GEMMA into a USB cable connected to your computer, press and release the reset button on the GEMMA (the red LED on the GEMMA will blink) and then use the Arduino software IDE to upload the sketch to the&nbsp;board.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Starduino_8bit_Super_Mario_Tree_Topper/Starduino_8bit_Super_Mario_Tree_Topper.ino

![](https://cdn-learn.adafruit.com/assets/assets/000/029/228/medium800/led_pixels_Starduino15.jpg?1450734226)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/229/medium800/led_pixels_Starduino16.jpg?1450734256)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/230/medium800/led_pixels_Starduino17.jpg?1450734270)

https://www.youtube.com/watch?v=BeeoePNr-to

# Starduino: 8-Bit Super Mario Tree Topper

## CircuitPython Code

![](https://cdn-learn.adafruit.com/assets/assets/000/066/536/medium800/led_pixels_gemma-cp.jpg?1543433078)

 **GEMMA&nbsp;M0** &nbsp;boards can&nbsp;run&nbsp; **CircuitPython** &nbsp;— a different approach to programming compared to Arduino sketches. In fact,&nbsp; **CircuitPython comes&nbsp;factory pre-loaded on GEMMA&nbsp;M0**. If you’ve overwritten it with an Arduino sketch, or just want to learn the basics of setting up and using CircuitPython, this is explained in the&nbsp;[**Adafruit GEMMA&nbsp;M0 guide**](https://learn.adafruit.com/adafruit-gemma-m0/circuitpython-setup-1).

Info: 

Below is CircuitPython code that works&nbsp;similarly (though not exactly the same) as the Arduino sketch shown on a prior page. To use this, plug the GEMMA M0 into USB…it should show up on your computer as a small&nbsp; **flash drive** …then edit the file “ **code.py** ” with your text editor of choice. Select and copy the code below and paste it into that file,&nbsp; **entirely replacing its contents** &nbsp;(don’t mix it in with lingering bits of old code). When you save the file, the code should&nbsp; **start running almost immediately** &nbsp;(if not, see notes at the bottom of this page).

**If GEMMA M0 doesn’t show up as a&nbsp;drive, follow the GEMMA M0 guide link above to prepare the board for CircuitPython.**

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

# Installing Libraries
This code requires two libraries be installed:

- **neopixel**
- **adafruit\_fancyled**

&nbsp;A factory-fresh board will have the neopixel library already installed. If you’ve just reloaded the board with CircuitPython, create the “lib” directory and then copy in the neopixel.mpy and adafruit\_fancyled folder from the&nbsp;[latest release of the Adafruit\_CircuitPython\_Bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/tag/20180213).&nbsp;

The&nbsp;[FancyLED library](https://github.com/adafruit/Adafruit_CircuitPython_FancyLED)&nbsp;being using in this CircuitPython example is not the same as the&nbsp;[FastLED](https://github.com/FastLED/FastLED)used for Arduino. FancyLED has a subset of FastLED features and some different syntax. The&nbsp;[FancyLED tutorial provides an excellent overview](https://learn.adafruit.com/fancyled-library-for-circuitpython/overview).&nbsp;

The file system layout on your gemma M0 should look like this:

```auto
$ pwd
/Volumes/CIRCUITPY
$ find .
.
./boot_out.txt
./.fseventsd
./.fseventsd/fseventsd-uuid
./lib
./lib/neopixel.mpy
./lib/adafruit_fancyled
./lib/adafruit_fancyled/adafruit_fancyled.mpy
./lib/adafruit_fancyled/fastled_helpers.mpy
./main.py

```

# Starduino: 8-Bit Super Mario Tree Topper

## Assemble the Awesome Starduino

The final step is to put the electronics into the star. Simply place the NeoPixel/GEMMA bundle into the cylindrical recess in the star with the LEDs facing forward, plug in the USB cable, and then place the base model onto the backside, snapping the four posts into place. It should all hold together nicely via friction.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/231/medium800/led_pixels_Starduino22.jpg?1450735379)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/232/medium800/led_pixels_Starduino25.jpg?1450735394)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/233/medium800/led_pixels_Starduino24.jpg?1450735423)

Plug the USB cable into a power source -- either a wall adapter or a battery -- and watch it sparkle!

https://youtu.be/5_xMsb2NASo

All that's left is to top your tree with your rad 8-bit Super Mario star!

![](https://cdn-learn.adafruit.com/assets/assets/000/029/237/medium800thumb/led_pixels_starduinoTopper.jpg?1450745231)


## Featured Products

### Adafruit GEMMA M0 - Miniature wearable electronic platform

[Adafruit GEMMA M0 - Miniature wearable electronic platform](https://www.adafruit.com/product/3501)
The **Adafruit Gemma M0** is a super small microcontroller board, with just enough built-in to create many simple projects. It may look small and cute: round, about the size of a quarter, with friendly alligator-clip sew pads. But do not be fooled! The Gemma M0 is incredibly...

In Stock
[Buy Now](https://www.adafruit.com/product/3501)
[Related Guides to the Product](https://learn.adafruit.com/products/3501/guides)
### Adafruit GEMMA v2 - Miniature wearable electronic platform

[Adafruit GEMMA v2 - Miniature wearable electronic platform](https://www.adafruit.com/product/1222)
 **Deprecation Warning: The Gemma bit-bang USB technique it uses doesn't work as well as it did in 2014, many modern computers won't work well. So while we still carry the Gemma so that people can maintain some older projects, we no longer recommend it.** <a...></a...>

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1222)
[Related Guides to the Product](https://learn.adafruit.com/products/1222/guides)
### NeoPixel Ring - 16 x 5050 RGB LED with Integrated Drivers

[NeoPixel Ring - 16 x 5050 RGB LED with Integrated Drivers](https://www.adafruit.com/product/1463)
Round and round and round they go! 16 ultra bright smart LED NeoPixels are arranged in a circle with 1.75" (44.5mm) outer diameter. The rings are 'chainable' - connect the output pin of one to the input pin of another. Use only one microcontroller pin to control as many as you can...

In Stock
[Buy Now](https://www.adafruit.com/product/1463)
[Related Guides to the Product](https://learn.adafruit.com/products/1463/guides)
### USB Cable - Standard A-B

[USB Cable - Standard A-B](https://www.adafruit.com/product/62)
This here is your standard A-B USB cable, for USB 1.1 or 2.0. Perfect for connecting a PC to your Arduino, USBtinyISP (among other things).  
  
3 feet / 1 meter long  
  
Color may vary!

In Stock
[Buy Now](https://www.adafruit.com/product/62)
[Related Guides to the Product](https://learn.adafruit.com/products/62/guides)
### 5V 1A (1000mA) USB port power supply - UL Listed

[5V 1A (1000mA) USB port power supply - UL Listed](https://www.adafruit.com/product/501)
Need a USB jack for charging or powering a project, but don't want to lug around a computer? This switching supply gives a clean regulated output at up to 1000mA! 110 or 240 input, so it works in any country. The plugs are "US 2-prong" style so you may need a plug adapter, but...

In Stock
[Buy Now](https://www.adafruit.com/product/501)
[Related Guides to the Product](https://learn.adafruit.com/products/501/guides)
### USB Battery Pack - 2200 mAh Capacity - 5V 1A Output

[USB Battery Pack - 2200 mAh Capacity - 5V 1A Output](https://www.adafruit.com/product/1959)
A smaller-sized rechargeable battery pack for your&nbsp;[Raspberry Pi](http://www.adafruit.com/raspberrypi)&nbsp;or [Raspberry Pi B+](https://www.adafruit.com/product/1914)&nbsp;(or&nbsp;[Arduino](http://www.adafruit.com/arduino), or&nbsp;<a...></a...>

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1959)
[Related Guides to the Product](https://learn.adafruit.com/products/1959/guides)
### PrintrBot Simple Metal 3D Printer - Black - Assembled

[PrintrBot Simple Metal 3D Printer - Black - Assembled](https://www.adafruit.com/product/1760)
New from Printrbot, the Metal Simple is a brand new rock solid, all metal, fully-assembled Printrbot Simple! As opposed to the [Printrbot Simple Kit](http://www.adafruit.com/products/1735), all of the laser cut wood parts have been replaced by rock solid metal and assembled. In...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1760)
[Related Guides to the Product](https://learn.adafruit.com/products/1760/guides)
### Hook-up Wire Spool Set - 22AWG Solid Core - 6 x 25 ft

[Hook-up Wire Spool Set - 22AWG Solid Core - 6 x 25 ft](https://www.adafruit.com/product/1311)
Perfect for bread-boarding, free wiring, etc. This box contains 6 spools of solid-core wire. The wire is easy to solder to and when bent it keeps its shape pretty well. We like to have a few spools of this stuff around which is why this set is quite nice! We suggest picking up wire strippers...

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

## Related Guides

- [AdaBox 007](https://learn.adafruit.com/adabox007.md)
- [Best Beginner Boards for Teachers](https://learn.adafruit.com/best-beginner-boards-for-teachers.md)
- [Trinket / Gemma Blinky Eyes](https://learn.adafruit.com/trinket-gemma-blinky-eyes.md)
- [Chirping Plush Owl Toy](https://learn.adafruit.com/chirping-plush-owl-toy.md)
- [Kaleidoscope Eyes (Trinket-Powered NeoPixel LED Ring Goggles)](https://learn.adafruit.com/kaleidoscope-eyes-neopixel-led-goggles-trinket-gemma.md)
- [Logan’s Run Hand Jewel LED](https://learn.adafruit.com/led-in-you-hand-logans-run-life-clock.md)
- [3D Printed LED Microphone Flag](https://learn.adafruit.com/3d-printed-led-microphone-flag.md)
- [Building CircuitPython](https://learn.adafruit.com/building-circuitpython.md)
- [Adafruit IO Basics: NeoPixel Controller](https://learn.adafruit.com/adafruit-io-basics-neopixel-controller.md)
- [Trinket NeoPixel LED Longboard](https://learn.adafruit.com/trinket-neopixel-led-longboard.md)
- [Bluetooth LE MIDI Controller](https://learn.adafruit.com/bluetooth-le-midi-controller.md)
- [GEMMA Hoop Earrings](https://learn.adafruit.com/gemma-hoop-earrings.md)
- [Festive Feather Holiday Lights](https://learn.adafruit.com/festive-feather-holiday-lights.md)
- [Larson Scanner Shades (Trinket-Powered NeoPixel LED Strip Glasses)](https://learn.adafruit.com/larson-scanner-shades.md)
- [3D Printed NeoPixel Ring Hair Dress](https://learn.adafruit.com/neopixel-ring-hair-dress.md)
