You can use the Adafruit ATMega32u4 breakout board as an Arduino Leonardo by flashing the bootloader in Arduino 1.0.1 to the board. To follow this process, you use another Arduino, like the Arduino Duemilanove, as a programmer.
- Connect the Arduino Duemilanove to your computer's USB port
- Open the Arduino 1.0.1 environment
- Select File > Examples > ArduinoISP and the IDE will open a new window with the Arduino sketch that makes the Duemilanove programmer.
- Select the board type you use as programmer, in this case a Duemilanove: Tools > Boards > Arduino Duemilanove w/ATMega328.
- Select the serial port your Arduino (the programmer) is using (/dev/ttyUSB0 in my case)
- Click the Upload icon to load the ArduinoISP sketch onto the Duemilanove
Now the Duemilanove is a bootloader programmer!
Next, to load the bootloader onto the ATMeag32u4 board, follow these steps:
Connect the Arduino's pins to the breakout board's pins.
Add three LED's (through 150ohm resistors) to these pins for status:
|9||Pulse - (yellow) indicates that the developer is working|
|8||Error - (red) lights when an error occurs|
|7||Programming - (green) communicating with the breakout board|
- Note: If you have an Arduino UNO, put a 10uF capacitor between RESET and GND pins, to disable autoreset function.
Now that the breakout board is connected, you are ready to burn the bootloader.
- Select the serial port (of which board?) in the Arduino IDE: Tools > Serial Port > (Arduino Serial Port)
- Select the Arduino Leonardo as the board: Tools > Board > Arduino Leonardo
- Make the Arduino Duemilanove the programmer by selecting Tools > Programmer > Arduino as ISP
- Select Tools > Burn Bootloader to load the bootloader onto your breakout board.
- The LED's will blink to indicate status. It takes about a minute.
- Now disconnect everything.
- Plug the breakout board directly into your computer.