The Arduino Leonardo, Arduino Micro, UNO R4 Minima and UNO R4 WiFi can all act as USB Human Interface Devices.
That means they can appear to a computer as:
- USB keyboard;
- USB mouse;
- macro pad;
- button box;
- custom controller;
- assistive input device.
But their USB architectures are very different.
The classic Leonardo and Micro use:
|
1 2 3 4 5 6 7 |
ATmega32U4 → application → native USB → keyboard/mouse |
The UNO R4 family uses a much newer:
|
1 2 3 4 5 6 |
Renesas RA4M1 Cortex-M4 48 MHz |
with far more CPU, memory and peripherals.
The simplest way to frame the choice is:
|
1 2 3 4 5 6 7 8 9 10 |
Leonardo / Micro → simple, proven USB HID → small AVR projects UNO R4 → HID plus much larger application → more CPU, RAM and peripherals |
Quick Comparison
| Feature | Leonardo / Micro | UNO R4 Minima | UNO R4 WiFi |
|---|---|---|---|
| Main MCU | ATmega32U4 | Renesas RA4M1 | Renesas RA4M1 |
| CPU | 8-bit AVR | 32-bit Cortex-M4 | 32-bit Cortex-M4 |
| Clock | 16 MHz | 48 MHz | 48 MHz |
| Flash | 32 KB | 256 KB | 256 KB |
| SRAM | 2.5 KB | 32 KB | 32 KB |
| Data memory / EEPROM | 1 KB EEPROM | 8 KB data memory | 8 KB data memory |
| Logic voltage | 5 V | 5 V | 5 V |
| USB connector | Micro-USB | USB-C | USB-C |
| Keyboard HID | Yes | Yes | Yes |
| Mouse HID | Yes | Yes | Yes |
| Physical UART separate from USB | Yes, Serial1 | Yes | Yes |
| Wi-Fi/BLE | No | No | Yes, ESP32-S3 |
| 12-bit DAC | No | Yes | Yes |
| CAN controller | No | Yes | Yes |
| RTC | No dedicated RTC | Yes | Yes |
| USB path complexity | Very simple | Simple/direct | More complex due ESP32-S3 bridge/routing |
All Four Boards Support Keyboard and Mouse HID
Arduino’s current Mouse documentation lists:
- Leonardo;
- Micro;
- UNO R4 Minima;
- UNO R4 WiFi;
as supported HID boards.
So the question is not:
|
1 2 3 4 |
Can UNO R4 do HID? |
It can.
The real question is:
|
1 2 3 4 |
Which architecture better matches the project? |
Leonardo and Micro: Native USB on the Main MCU
The ATmega32U4 directly handles:
|
1 2 3 4 5 6 |
your sketch + USB |
There is no separate USB-to-serial bridge between the MCU and the computer.
That architecture is extremely straightforward for HID.
Why ATmega32U4 Became Popular for HID
For many years, Leonardo and Micro were the obvious Arduino choices for:
- DIY keyboards;
- macro pads;
- sim racing button boxes;
- joystick projects;
- custom control panels.
The sketch can simply use libraries such as:
|
1 2 3 4 5 |
Keyboard Mouse |
and the same chip presents the USB device directly to the PC.
UNO R4 Minima: Modern Native USB
The UNO R4 Minima uses the:
|
1 2 3 4 |
Renesas RA4M1 |
which includes USB hardware connected directly to the board’s:
|
1 2 3 4 |
USB-C |
connector.
So Minima preserves the clean conceptual architecture:
|
1 2 3 4 5 6 7 |
RA4M1 → application → HID → USB-C |
but provides much more processing power and memory than the ATmega32U4.
UNO R4 WiFi Has a More Complex USB Path
The UNO R4 WiFi contains:
|
1 2 3 4 5 6 |
The ESP32-S3 normally provides Wi-Fi/Bluetooth and also participates in the board’s USB/serial bridge system.
Arduino’s current user manual explains that the USB data path is routed through switches and, by default, communication passes through the ESP32-S3 bridge.
UNO R4 WiFi Can Still Do Native HID
Despite the more complex routing, Arduino explicitly supports:
|
1 2 3 4 5 |
keyboard HID mouse HID |
on the UNO R4 WiFi.
When the HID stack is enabled, the board can present the RA4M1 HID interface through USB.
UNO R4 WiFi Can Re-Enumerate Differently in HID Mode
Arduino warns that when HID is enabled on UNO R4 WiFi, the board may appear as a:
|
1 2 3 4 |
different USB port |
on the computer.
If that happens, Arduino recommends:
|
1 2 3 4 5 |
double-tap RESET → select the board again |
This is an important practical difference from a simple serial-only sketch.
Serial Remapping on UNO R4 WiFi
Arduino’s current UNO R4 WiFi implementation states that including:
|
1 2 3 4 |
<HID.h> |
remaps:
|
1 2 3 4 5 |
Serial → SerialUSB |
so the HID-capable USB path can expose additional USB serial-control features.
This is another reason a HID sketch on UNO R4 WiFi can behave differently from an ordinary sketch.
Leonardo/Micro USB Behaviour Is Also Special
The older boards are not completely immune to USB surprises.
Because the ATmega32U4 runs both:
|
1 2 3 4 5 6 |
the sketch and the USB device stack |
resetting the MCU temporarily disconnects the USB device.
During upload, the bootloader can appear as a different serial port.
ATmega32U4 Uses the 1200 bps Touch Technique
The normal Leonardo/Micro upload process uses a:
|
1 2 3 4 |
1200 bps touch |
to trigger the bootloader.
This means the application USB port can disappear and the bootloader port can appear temporarily.
UNO R4 Has a Better Recovery Mechanism
The UNO R4 family supports entering the bootloader through:
|
1 2 3 4 |
double-tap RESET |
which is particularly useful if a bad HID sketch:
- spams keystrokes;
- locks USB;
- crashes the application;
- prevents normal enumeration.
Bad HID Code Can Make Any Board Annoying to Reprogram
For example, this is dangerous:
|
1 2 3 4 5 6 |
void loop() { Keyboard.print("HELLO"); } |
because it continuously types into the host computer.
A safer design uses a physical enable input.
Safe Keyboard Example
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
#include <Keyboard.h> const int enablePin = 4; void setup() { pinMode(enablePin, INPUT_PULLUP); Keyboard.begin(); } void loop() { if (digitalRead(enablePin) == LOW) { Keyboard.write('A'); while ( digitalRead(enablePin) == LOW ) { } } } |
The same basic HID logic can be used on:
- Leonardo;
- Micro;
- UNO R4 Minima;
- UNO R4 WiFi.
Keyboard API
Typical Keyboard functions include:
|
1 2 3 4 5 6 7 8 9 10 |
Keyboard.begin() Keyboard.end() Keyboard.write() Keyboard.print() Keyboard.press() Keyboard.release() Keyboard.releaseAll() |
Mouse API
Typical Mouse functions include:
|
1 2 3 4 5 6 7 8 9 |
Mouse.begin() Mouse.end() Mouse.move() Mouse.click() Mouse.press() Mouse.release() |
Raw HID Capability Is Not the Main Performance Limit
A keyboard report is tiny.
So even the 16 MHz ATmega32U4 is easily fast enough for ordinary keyboard and mouse projects.
You do not need a 48 MHz Cortex-M4 simply to send:
|
1 2 3 4 |
one keypress |
to a PC.
UNO R4 Becomes Valuable When HID Is Only One Part of the Project
Suppose a controller also needs:
- many state machines;
- sensor filtering;
- CAN communication;
- large lookup tables;
- display handling;
- networking;
- complex menu logic.
That is where the UNO R4 becomes much more attractive.
CPU Difference
Leonardo/Micro:
|
1 2 3 4 5 6 |
ATmega32U4 8-bit AVR 16 MHz |
UNO R4:
|
1 2 3 4 5 6 |
RA4M1 32-bit Cortex-M4 48 MHz |
The R4 is not simply three times faster because architecture matters as well.
The Cortex-M4 is a much more capable processor for:
- 32-bit arithmetic;
- interrupt-heavy applications;
- DSP-style work;
- larger libraries;
- complex firmware.
Memory Difference Is Huge
Leonardo/Micro:
|
1 2 3 4 5 |
2.5 KB SRAM 32 KB Flash |
UNO R4:
|
1 2 3 4 5 |
32 KB SRAM 256 KB Flash |
That gives R4 approximately:
|
1 2 3 4 5 |
12.8× the SRAM 8× the Flash |
at the headline level.
Why RAM Matters for HID Controllers
A basic button box does not need much RAM.
But a more advanced controller may store:
- keymaps;
- profiles;
- macro sequences;
- menu text;
- USB descriptors;
- sensor calibration data;
- network buffers.
On an ATmega32U4, 2.5 KB SRAM becomes restrictive very quickly.
UNO R4 Has Better ADC Capability
Leonardo/Micro use a:
|
1 2 3 4 |
10-bit ADC |
UNO R4 supports analogue reads up to:
|
1 2 3 4 |
14-bit resolution |
through the RA4M1.
That is useful for:
- joysticks;
- pedal sensors;
- analogue controls;
- instrumentation.
UNO R4 Includes a True DAC
UNO R4 also provides a:
|
1 2 3 4 |
12-bit DAC |
on A0.
Leonardo and Micro have:
|
1 2 3 4 |
no true DAC |
and use PWM for analogWrite().
UNO R4 Includes CAN
The RA4M1 includes a CAN controller.
That means a USB HID controller can also communicate with:
- automotive networks;
- industrial equipment;
- machine controllers;
with an external CAN transceiver.
Leonardo/Micro need an external CAN controller such as an MCP2515-class device.
UNO R4 Includes an RTC
The UNO R4 RA4M1 includes a real-time clock.
This can be useful for:
- timestamped macros;
- scheduled actions;
- standalone controllers;
- logging.
UNO R4 WiFi Adds Wireless
The WiFi version adds:
|
1 2 3 4 5 6 |
ESP32-S3 Wi-Fi Bluetooth LE |
plus the:
|
1 2 3 4 5 |
12 × 8 LED matrix Qwiic connector |
This enables a USB controller that can also:
- receive commands over Wi-Fi;
- publish state to a network;
- communicate over BLE;
- display local status.
That Extra Hardware Comes with More Complexity
For a basic six-button keyboard emulator, the UNO R4 WiFi architecture is arguably more complicated than needed.
You now have:
|
1 2 3 4 5 6 7 8 9 10 |
RA4M1 + ESP32-S3 + USB routing + wireless firmware |
instead of:
|
1 2 3 4 5 6 |
ATmega32U4 + USB |
UNO R4 Minima Is the Cleaner Modern HID Upgrade
If you want:
- 48 MHz Cortex-M4;
- 32 KB SRAM;
- 256 KB Flash;
- native HID;
- USB-C;
- 5 V logic;
- CAN;
- DAC;
without the ESP32-S3 bridge/radio layer, UNO R4 Minima is the simpler modern option.
Micro Is Still the Better Compact Board
UNO R4 uses the full UNO footprint.
The Arduino Micro is:
|
1 2 3 4 |
48 × 18 mm |
and breadboard-friendly.
For a compact embedded USB controller, physical size may matter more than CPU performance.
Leonardo Is Still Convenient for Shields
Leonardo retains the classic Arduino shield layout.
If your HID project uses:
- relay shield;
- LCD shield;
- motor shield;
- prototype shield;
its full-size form factor can still be useful.
UNO R4 Also Uses the UNO Shield Form Factor
The R4 preserves the familiar UNO physical layout and 5 V logic.
This makes it easier to migrate many shield-based HID projects from Leonardo or UNO-era designs.
Software compatibility still needs to be checked because:
|
1 2 3 4 5 6 |
ATmega32U4 ≠ RA4M1 |
AVR-Specific Libraries Can Break on UNO R4
A library that uses:
|
1 2 3 4 5 6 |
PORTB TCCR1A ISR(...) |
directly is AVR-specific.
It will not simply compile on the RA4M1.
Generic Arduino libraries based on:
- digitalRead();
- digitalWrite();
- analogRead();
- Wire;
- SPI;
are much easier to migrate.
5 V Logic on All These Boards
One major advantage is that:
|
1 2 3 4 5 6 7 |
Leonardo Micro UNO R4 Minima UNO R4 WiFi |
all use:
|
1 2 3 4 |
5 V GPIO logic |
This makes migration easier for many older Arduino circuits.
But GPIO Current Is Different
The classic ATmega32U4 boards commonly use:
|
1 2 3 4 |
20 mA |
as the current board-level guidance per GPIO.
The current UNO R4 pinout specifies:
|
1 2 3 4 |
8 mA maximum per pin |
with a board-level overall GPIO current limit.
So do not assume a circuit that directly sinks relatively high LED current on Leonardo can be copied unchanged to UNO R4.
USB Connector Upgrade
Leonardo and Micro use:
|
1 2 3 4 |
Micro-USB |
while UNO R4 uses:
|
1 2 3 4 |
USB-C |
For a new controller enclosure, USB-C is generally easier to source and mechanically more convenient.
Which Is Better for a Simple Macro Pad?
Leonardo or Micro.
A simple macro pad needs very little:
- CPU;
- RAM;
- Flash.
The ATmega32U4 architecture is straightforward and very well established.
Which Is Better for a Compact Macro Pad?
Micro.
It provides the same HID capability as Leonardo in a much smaller:
|
1 2 3 4 |
48 × 18 mm |
board.
Which Is Better for a Complex Simulator Controller?
UNO R4 is the stronger platform if the project includes:
- many analogue axes;
- menus;
- CAN;
- large configuration tables;
- complex filtering;
- high-level state machines.
Which Is Better for HID Plus Wi-Fi?
UNO R4 WiFi.
Leonardo and Micro would require an additional Wi-Fi module.
Which Is Better for Pure USB Simplicity?
Leonardo/Micro.
The entire architecture is simply:
|
1 2 3 4 5 |
ATmega32U4 → USB |
Which Is Better for Modern USB-C Without Wireless?
UNO R4 Minima.
It gives the newer RA4M1 platform without the WiFi version’s ESP32-S3 routing layer.
Which Is Better for Joysticks and Analogue Axes?
UNO R4 has much more capable analogue hardware and significantly more processing headroom.
But software support for a specific joystick/HID report class still needs to be verified for the library you intend to use.
Keyboard and mouse HID support is officially documented.
Recovery Strategy
For any HID development board, build a recovery mechanism into your workflow.
Useful approaches include:
- physical HID-enable switch;
- startup delay;
- safe-mode pin;
- double-tap reset on UNO R4;
- bootloader reset timing on ATmega32U4.
Decision Table
| Requirement | Better fit |
|---|---|
| Simplest HID architecture | Leonardo / Micro |
| Smallest board | Micro |
| Classic shield footprint | Leonardo / UNO R4 |
| USB-C | UNO R4 |
| Most CPU performance | UNO R4 |
| Most SRAM | UNO R4 |
| Most Flash | UNO R4 |
| Native keyboard/mouse HID | All |
| Wi-Fi/BLE | UNO R4 WiFi |
| CAN controller | UNO R4 |
| True DAC | UNO R4 |
| Advanced ADC | UNO R4 |
| Simplest modern R4 USB path | UNO R4 Minima |
| Breadboard-friendly HID | Micro |
Quick Reference
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
Leonardo / Micro ATmega32U4 16 MHz 8-bit AVR 32 KB Flash 2.5 KB SRAM 1 KB EEPROM 5 V logic native USB Keyboard / Mouse HID Serial = USB Serial1 = D0/D1 Micro-USB UNO R4 Minima RA4M1 48 MHz Cortex-M4 256 KB Flash 32 KB SRAM 8 KB data memory 5 V logic native HID USB-C CAN 12-bit DAC RTC up to 14-bit ADC UNO R4 WiFi same RA4M1 + ESP32-S3 Wi-Fi BLE 12×8 LED matrix Qwiic more complex USB routing HID supported |
Final Thoughts
Leonardo and Micro are not obsolete simply because UNO R4 is faster.
For a simple USB keyboard, mouse or macro controller, the ATmega32U4 boards remain extremely effective because:
|
1 2 3 4 5 6 7 |
USB is native the architecture is simple the libraries are mature the workload is small |
The UNO R4 becomes the more capable platform when HID is only one part of a larger embedded system.
Its:
|
1 2 3 4 5 6 7 8 9 10 |
48 MHz Cortex-M4 32 KB SRAM 256 KB Flash CAN DAC RTC advanced ADC |
provide much more room for complex application logic.
For the cleanest modern USB-C HID architecture, the UNO R4 Minima is especially attractive.
For HID plus wireless connectivity, the UNO R4 WiFi adds Wi-Fi and Bluetooth, but its USB architecture is more complex because of the ESP32-S3 bridge/routing system.
For the smallest proven USB HID board, the Arduino Micro remains hard to beat.
For detailed pin mapping, see our Arduino Leonardo pinout guide, Arduino Micro pinout guide and UNO R4 WiFi pinout guide.