Hi,
I want to make a macro-pad, but ATMega32u4 seems a bit… overkill.
So I guess using a smaller MCU, like ATMega16u2, would be… good, since it’s smaller and, maybe, cheaper.
The ATMega*U2 and ATMega*U4 come with a DFU bootloader preinstalled from the factory.
You can find information in this application note:
If you pull ~HWB low and ~RESET high on the board, every time you bring ~RESET low the board will go into DFU mode and can be flashed by dfu-programmer or avrdude -c flip1.
You can see an example implementation in my macropad, using ATMega32U2:
The ATMega16U2 and ATMega32U2 are identical, but the 32u2 has more flash and RAM. I’d be very careful with the ATMega16U2, it only has 512 bytes of RAM. At least with QMK and RGB backlighting IME that’s not even enough for a macropad like this one, even with just 12 keys.