How to Reprogram the Tesla-tronic Programmable Pins
Blue Moon Designs latest creation, the Tesla-tronic Programmable Pin, allows you to change the pattern and color of the glowing LED embedded in the pin to any pattern or color you wish. The Blue Moon Designs page on Codebender features a variety of programs that you can program your own pin with, including single-color pulsing, flickering, and multicolored rainbow sequences.
This rest of this page includes instructions for how to reprogram your pin.
1. Choose your method:
There are two methods you can use to enter new programming into your pin:
A. Use the Arduino IDE app to save the code to your computer and upload it from there. This method is a good choice if you are already a little familiar with Arduino microcontrollers. You'll need to also install additional board drivers which will allow the Arduino IDE to talk to the Adafruit Gemma board. Simply follow the instructions from the linked pages to complete these two steps.
B. Use the Blue Moon Designs' page on the Codebender website to edit and upload new code. This method is a good choice for people who are less familiar with Arduino and/or programming microcontrollers. You'll need to add the Codebender plugin to your web browser, and you'll want to select Adafruit Gemma 8mhz from the list of available boards.
2. Connect the board:
Connect the micro-USB cable to the circular microcontroller board on the back of the pin, and connect the other end to your computer. Note that the particular board I've used sometimes has a difficult time entering bootloader mode (described in the step below) when connected to a USB 3.0 port, so you might need to use a USB hub in between the board and your computer.
3. Bootloader mode:
Before you can send the new program to your pin, it must be in what is known as bootloader mode -- this means that the board is listening for a new program to be sent from your computer. Simply press the tiny black button located opposite the on/off switch on the front of the board / back of the LED pin to get the board into bootloader mode.
When the Gemma board is in bootloader mode, the tiny built-in red LED will pulse on and off for about ten seconds.
This video shows what bootloader mode looks like (on a different style of board, but the pulsing is the same):
4. Upload new code:
While the red light is flashing (indicating bootloader mode), click the Run on Arduino button (from Codebender) or the Upload (arrow) button (from the Arduino IDE) to send your new code to the pin. It should begin running the new light sequence almost immediately. If it doesn't, check the error messages that you may have gotten to see if you can figure out what the problem is.
Cannot find XX - This message occurs if you have not selected the correct type of board from the list of available boards. Make sure you select Adafruit Gemma 8mhz.
Broken Pipe - Make sure you click the Run on Arduino or Upload button while the pin is still in bootloader mode -- otherwise the board is not listening for the code that you are trying to send it.
5. Enjoy your new program!
If you've completed all the steps above, your new program / new light sequence should be running on your pin. Success!
The code featured below is the BlueMoon_Flicker pattern, which displays a random flickering flame pattern in yellow (by default), but you can change the light color as indicated in the code to display other colors.