This project involves lots of small fiddly bits, moving parts, and lots and lots of wires.  In order to make success more likely you will definitely want to test your components at each step of the process, so you don't spend hours of time soldering only to find that it all mysteriously doesn't work.  Testing at each step means you'll catch any shorts or mistakes early.  Plus you get to see your lights come on right away which makes the whole process much more fun and satisfying.

My favorite way to test is using a Gemma microcontroller and some alligator clips.  The Gemma is inexpensive and really easy to use for prototyping.  You can test any combination of wires without soldering or mucking about with breadboards and headers.  

If this is your first time using Arduino

Check out the getting started guide here.  You'll need to make sure you have Adafruit's boards installed as well as the Adafruit Neopixel library.

Plug your Gemma in to your computer using its USB port.  Open your Arduino IDE and select Adafruit Gemma from your Boards menu.

Go to File > Examples > Adafruit_Neopixel > buttoncycler and open the buttoncycler code.  Find these lines at the top:

#define BUTTON_PIN   2    // Digital IO pin connected to the button.  This will be
                          // driven with a pull-up resistor so the switch should
                          // pull the pin to ground momentarily.  On a high -> low
                          // transition the button press logic will execute.

#define PIXEL_PIN    6    // Digital IO pin connected to the NeoPixels.

#define PIXEL_COUNT 16

Change BUTTON_PIN to 0 and PIXEL_PIN to 1.  Change the PIXEL_COUNT to reflect the number of buttons you are planning to make.  

Press the Reset button on the Gemma to get it into bootloader mode, and then immediately press the upload button in Arduino to upload the code.

Then, get your alligator clips out and hook them up thusly:

  • Red > Gemma Vout
  • Black > Gemma G
  • White > Gemma D1
  • Green > Gemma D0

The clips' colors will correspond to the wire colors used in the rest of this project.   You can power the Gemma from the USB port or plug a battery in to the JST connector.

This guide was first published on Jul 25, 2016. It was last updated on Jul 25, 2016.

This page (Testing Setup) was last updated on Jun 27, 2016.

Text editor powered by tinymce.