The Arduino code presented below works equally well on all versions of GEMMA: v1, v2 and M0. But if you have an M0 board, consider using the CircuitPython code on the next page of this guide, no Arduino IDE required!

Program Gemma

We used the code from GitHub user HerrRausB to generate complex animations in the NeoPixel ring. You can download his code from GitHub. The code is nicely documented and has editable parameters that can be customized to fit your project. Huge thanks to HerrRausB!

Once you have the sketches how you want, you will need to upload the code to the Gemma. Please follow the instructions on the Gemma introduction guide to get your Arduino IDE setup with the Gemma. Once you have that sorted out, you will need to push the reset button on the Gemma and then hit the upload sketch button(the arrow icon next to check mark) in the Arduino IDE.

Prototype

If your unfamiliar with connecting the Gemma to a NeoPixel ring, you should prototype the circuit by wiring the components together with alligator clips. On the Gemma, wire up the pin labeled "D0" to the "Data Input" pin on the NeoPixel Ring. Next, wire up ground ("GND") pin of the Gemma to the "Power Signal Ground" pin on the NeoPixel Ring. Now you can connect the Power 5V DC pin on the NeoPixel Ring to the "Vout" pin of the Gemma. You can now plug-in a USB cable from your computer to the Gemma to power it on for prototyping.

This guide was first published on Nov 13, 2013. It was last updated on Mar 18, 2024.

This page (Arduino Code) was last updated on Mar 08, 2024.

Text editor powered by tinymce.