I had the similar issue trying to use Darran's HID usb keyboard 0.3 stuff from http://www.smartinteractionlab.com/lufa-example-turning-your-arduino-into-a-keyb:
I have Arduino Uno Rev.3
I'm using the Pololu USB AVR ISP programmer.
Arduino IDE 1.0 for Windows
Windows 7 Ultimate 64 bit
I solved the problem by making sure that the UNO Rev 3 was connected to a USB port on the PC via its USB cable along
with the having the Pololu usb cable being connected to the PC and the at90USB162 ISCP port on the UNO Rev 3 at the same time.
First, I connected the UNO Rev 3 ,started the Arduino 1.0 IDE and imported and uploaded the usb-keyboard-0.3.pde example program into the UNO Rev 3.
I connected the free end of the Pololu six pin ribbon connector to the at90usb162 ICSP connector on the UNO Rev 3 with the red stripe aligned just like the web site showing the MKII
Using a USB cable with a Micro B connector, connect it to the Pololu Micro B port and the other end connect to a PC USB port.The Pololu installed as COM17 on my PC.
Followed Pololu instructions on their web site to add the programmer to the Arduino 1.0 IDE environment.The programmer type is avrispv2 , STK500 protocol
Opening a Windows command console window,
I changed directory to my C:\Users\gknight\Documents\arduino-1.0-windows\arduino-1.0\hardware\tools\avr folder
I copied Darran's arduino-keyboard-0.3.hex into my C:\Users\gknight\Documents\arduino-1.0-windows\arduino-1.0\hardware\tools\avr folder.
I copied the original Uno Rev.3 at90usb162 firmware from arduino\firmwares\arduino-usbserial\ folder ,Arduino-usbserial-atmega16u2-Uno-Rev3.hex,
into my C:\Users\gknight\Documents\arduino-1.0-windows\arduino-1.0\hardware\tools\avr folder to switch the Uno Rev3 back to usb IDE mode.
From the website, I modified the avrdude command for at90usb162
To use the 0.3 usb firmware use:
bin\avrdude -F -p at90usb162 -C etc\avrdude.conf -P COM17 -c avrispv2 -U flash:w:arduino-keyboard-0.3.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.06s
avrdude: Device signature = 0x1e9489
avrdude: Expected signature for AT90USB162 is 1E 94 82
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "arduino-keyboard-0.3.hex"
avrdude: input file arduino-keyboard-0.3.hex auto detected as Intel Hex
avrdude: writing flash (4022 bytes):
Writing | ################################################## | 100% 1.65s
avrdude: 4022 bytes of flash written
avrdude: verifying flash memory against arduino-keyboard-0.3.hex:
avrdude: load data flash data from input file arduino-keyboard-0.3.hex:
avrdude: input file arduino-keyboard-0.3.hex auto detected as Intel Hex
avrdude: input file arduino-keyboard-0.3.hex contains 4022 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 1.22s
avrdude: verifying ...
avrdude: 4022 bytes of flash verified
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):
Writing | ################################################## | 100% 0.02s
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:
Reading | ################################################## | 100% 0.03s
avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude: reading input file "0xD9"
avrdude: writing hfuse (1 bytes):
Writing | ################################################## | 100% 0.02s
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xD9:
avrdude: load data hfuse data from input file 0xD9:
avrdude: input file 0xD9 contains 1 bytes
avrdude: reading on-chip hfuse data:
Reading | ################################################## | 100% 0.02s
avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xF4"
avrdude: writing efuse (1 bytes):
Writing | ################################################## | 100% 0.02s
avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xF4:
avrdude: load data efuse data from input file 0xF4:
avrdude: input file 0xF4 contains 1 bytes
avrdude: reading on-chip efuse data:
Reading | ################################################## | 100% 0.02s
avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0x0F"
avrdude: writing lock (1 bytes):
Writing | ################################################## | 100% 0.03s
avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x0F:
avrdude: load data lock data from input file 0x0F:
avrdude: input file 0x0F contains 1 bytes
avrdude: reading on-chip lock data:
Reading | ################################################## | 100% 0.02s
avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
"Hello world" started printing in the command console window.
To go back to IDE mode I disconnected the UNO Rev 3 USB cable long enough to stop the hello world printing.
I pasted the following command in the window in preparation
bin\avrdude -F -p at90usb162 -C etc\avrdude.conf -P COM17 -c avrispv2 -U flash:w:Arduino-usbserial-atmega16u2-Uno-Rev3.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -Uefuse:w:0xF4:m -U lock:w:0x0F:m
I re-connected the UNO Rev 3 USB cable and pressed enter:
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.03s
avrdude: Device signature = 0x1e9489
avrdude: Expected signature for AT90USB162 is 1E 94 82
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "Arduino-usbserial-atmega16u2-Uno-Rev3.hex"
avrdude: input file Arduino-usbserial-atmega16u2-Uno-Rev3.hex auto detected as I
ntel Hex
avrdude: writing flash (4034 bytes):
Writing | ################################################## | 100% 1.35s
avrdude: 4034 bytes of flash written
avrdude: verifying flash memory against Arduino-usbserial-atmega16u2-Uno-Rev3.he
x:
avrdude: load data flash data from input file Arduino-usbserial-atmega16u2-Uno-R
ev3.hex:
avrdude: input file Arduino-usbserial-atmega16u2-Uno-Rev3.hex auto detected as I
ntel Hex
avrdude: input file Arduino-usbserial-atmega16u2-Uno-Rev3.hex contains 4034 byte
s
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 1.16s
avrdude: verifying ...
avrdude: 4034 bytes of flash verified
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):
Writing | ################################################## | 100% 0.02s
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:
Reading | ################################################## | 100% 0.02s
avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude: reading input file "0xD9"
avrdude: writing hfuse (1 bytes):
Writing | ################################################## | 100% 0.02s
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xD9:
avrdude: load data hfuse data from input file 0xD9:
avrdude: input file 0xD9 contains 1 bytes
avrdude: reading on-chip hfuse data:
Reading | ################################################## | 100% 0.02s
avrdude: verifying ...
avrdude: 1 bytes of hfuse verified .....etc
and I was back in IDE mode.
In the beginning, I could have edited the "hello world stuff" out of the pde to prevent the awkward connect-reconnect to go back to IDE mode.