While the latest batch of Arduino and Arduino-compatible boards either have a chip capable of USB or rely on a V-USB implementation, did you know earlier Uno and Mega boards actually have two microcontrollers?
Writing for Hackaday, Brian Benchoff notes that “an ATmega16U2 takes care of the USB connection, while the standard ‘328 or ‘2560 takes care of all ‘duino tasks. Wouldn’t it be great is you could also use the ’16U2 on the Uno or Mega for some additional functionality to your Arduino sketch?”
That’s now a reality thanks to a Maker by the name of NicoHood. Both the [Atmel based] Uno and Mega boards possess a pair of MCUs, of which the ’16U2 is generally used for USB-Serial translation. Meanwhile, it can serve as standalone AVR MCU with (or without) USB functions as well.
Using what NicoHood calls “HoodLoader2,” Makers now have the option of reprogramming the ‘16U2 of an Arduino Uno/Mega R3 with custom sketches, and using its seven (sometimes overlooked) I/O pins.
“This means you can use the ’16U2 as a normal USB AVR like a Leonardo,” NicoHood adds.
With a fully-compatible USB-HID core and CDC serial, HootLoader2 is a real bootloader for the ’16U2 — not a firmware. It can replace the DFU bootloader with a CDC bootloader and USB serial function. This enables new USB functions like an HID keyboard, mouse, media keys and a gamepad, the addition of extra sensors or LEDs, or pretty much anything else you can do with a normal Arduino, Benchoff explains.
“The great thing about this is that you actually have two fully Arduino-compatible microcontrollers in one Arduino Uno/Mega board – the board most of you already own. Your main MCU (328/2560) is still reprogrammable if you enter bootloader mode. All you need for this is a normal Arduino Uno/Mega R3 and some cables to install the new HoodLoader2.”