How to write your own hex file for DFU firmware upgrade.

Hello Arduino community! :)

Where can I learn how to write my own hex files to reappropriate my Arduino Uno as another device (e.g. convert it into an input device like a keyboard or mouse)?


Thanks johnwasser. I saw that page, but it doesn't really show how to make a hex file (the process in programming it). I see in the "Using other firmware" section some third-party examples. I want to learn how to make my own firmware, specifically learning how to imitate various types of USB devices like keyboards, mice, or joysticks.

If you want to emulate USB devices you should probably start with the Leonardo, Esplora, Micro, or Lillypad USB. They use the ATmega32u4 (or similar) as their main processor so you can write sketches that emulate USB devices. Doing stuff on the little ATmega8U2 on the Arduino UNO is a hack and it will be very hard to find people willing to advise you, at least in the Arduino forums.

If you REALLY want to do the hacking you will probably have to switch from the Arduino IDE to another tool like Atmel Studio. This takes you WAY out of the realm of Arduino programming so you should probably seek advice in the AVRFreaks forum: