I was inspired by the folks at MCN2013 to try and make my own wearable tech hat. So, I found a tutorial that looked interesting and modified it for myself. I decided to add a button that would select the light pattern or mic use. That was fun.
Here are some of my quick lessons learned:
- I used a Gemma instead of a Flora for the Arduino microcontroler. Although they are similar, the Gemma has less features. Know that when planning your project.
- Adafruit makes it’s own version of the Arduino IDE. Download it here.
- Microcontrollers cannot multi-task. So, when I added a button to select the pattern of lights, I also added the complexity of code. Check out the Arduino Blink without Delay examples. Basically, I needed to change the code to keep checking if the button had been pushed. I first tested with an Arduino so that I could receive serial messages of variable states. View that code here. I ended up rewriting all of the NeoPixel code examples to follow the blink without delay style of code.
- It’s easy to get a button to think it’s been pushed many times. Follow the Debounce tips.
- I need to work on my sewing skills.
- Gemma has a tiny amount of space allowed for code. So, I was not able to get all of the pieces into one program. There are probably ways to optimize my code. But for right now, I’ve just divided them into two different options. Download the code at the following links: