After a note from [Scott Fish] posting a comment to the hackaday article, I went back and flashed a verified working version of the original badge firmware (properly dumped from a friend's badge) back to my badge.
It seems Scott was having trouble getting the badge to reboot to a bootloader so that it could be overwritten with custom firmware from the Arduino IDE. He was just getting the error:
Connecting to programmer: .avrdude: butterfly_recv(): programmer is not responding
I too ran into the same error via both the Arduino IDE and avrdude command line. This tells me the badge either does not have a bootloader, or something is preventing it from entering the bootloader properly when reset.
This means the only way to write custom firmware to the badge is to first burn the Arduino bootloader to the onboard Atmega32u4. That process requires an external AVR programmer of some sort. I personally used the buspirate. Here are the steps I had to take to get the badge to behave like a regular Arduino Leonardo, programmable via USB.
- Solder a 2x3 male pin header to the badge's ICSP port. This is just above the center pot, with pin 1 being the lower left corner. There is a small _ next to this pin to make it obvious.
- Don't make the mistake I made and try to just hold 6 pins to the pads. This is how I corrupted my firmware to begin with.
- Connect your AVR programmer to the ICSP port
- Open up the Arduino IDE, open the "Tools" menu, and change the following:
- Board: Arduino Leonardo
- Port: [select the COM / tty serial port of your AVR programmer]
- Programmer: [select the type of AVR programmer you have]
- Open up the example "BareMinimum" sketch from the "File > Examples > 01.Basics" sub menu
- Click "Burn Bootloader"
- Once complete, disconnect your AVR programmer and ICSP cable
- Plug the badge in via USB
If everything went well, you should have an Arduino Leonardo show up in your IDE serial port list. Now you should be able to upload my example RGB sketch, or write your own.
Good luck, and I hope this helps clear up any confusion around re-purposing the badge for custom firmware.