When you think of Arduino, you probably think of the Arduino Uno. It's the OG maker board, an iconic form factor housing easy-to-use pins and an Atmel microcontroller at its heart, programmable through a well-documented and easy-to-use coding language and IDE.
Another Arduino looks very similar but costs less and can do more—introducing the other OG from Arduino: The Leonardo.
What is the Arduino Leonardo?
The Arduino Leonardo is a development board featuring the ATMega32u4 microcontroller (MCU). Similar in form factor to the Arduino Uno, it actually has a greater number of input/output (I/O) options. The Leonardo has 20 digital I/O pins, 7 of which can be used for PWM, and 12 analog input pins.
The Leonardo can also take double the current per I/O pin to the Uno, and uses a MicroUSB port for programming and power.
By far the biggest difference is the Leonardo's ability to mimic the keyboard and mouse of your computer. This is due to the ATMega32u4's ability to work as a USB human interface device (HID). This opens it up to a whole set of possible projects and learning opportunities that the Uno isn't able to easily replicate.
Arduino Leonardo Specs
- Microcontroller: ATmega32u4
- Operating Voltage: 5V
- Input Voltage (Recommended): 7-12V
- Input Voltage (limits): 6-20V
- Digital I/O Pins: 20
- PWM Channels: 7
- Analog Input Channels: 12
- DC Current per I/O Pin: 40 mA
- DC Current for 3.3V Pin: 50 mA
- Flash Memory: 32 KB (ATmega32u4) of which 4 KB used by bootloader
- SRAM: 2.5 KB (ATmega32u4)
- EEPROM: 1 KB (ATmega32u4)
- Clock Speed: 16 MHz
- Lengh: 68.6 mm
- Width: 53.3 mm
- Weight: 20 g
What Can You Make With an Arduino Leonardo - Arduino Leonardo Projects
Thanks to the ATMega32u4 chip on the Arduino Leonardo, all Arduino Micro projects also work with the board, thanks to the shared MCU. Also, since the Arduino Leonardo runs at the same voltage as the Arduino Uno, all Arduino shields (REV3 or later) work with it.
Not only that, but the two boards are so similar that almost any Arduino Uno/Nano project should work with only minimal tweaking. Unsurprisingly, the USB HID feature of the Leonardo makes it ideal for projects that require some kind of human interaction.
Turn any remote into a Wireless keyboard
Maker AmalMathew uses the HID properties of the Arduino to create an infra-red keyboard in this project they documented on the Electromaker website.
Using only a repurposed remote, a cheap IR sensor, and the Arduino Leonardo, AmalMatthew can essentially control his computer wirelessly so long as there is a line of sight. He even includes a (not secure but still cool) place to put your Windows password to log in using the remote too!
Controlling a Robot With the Arduino Leonardo
The Tactigon team used a Leonardo along with a BLE module to control a robot. The Leonardo is well specced for robotics thanks to its many digital PWM pins, perfect for running motors, servos, and steppers.
DIY Stream Deck
Stream decks have grown in popularity, with even non-streamers adopting them for mic control, audio tweaking, and muting, and custom macros for controlling computers. While there are many commercial options, there are some DIY kits available to build your own.
Maker sparkglug documented the process of creating the Sparkpad here on Electromaker, and came up with an incredibly professional-looking device. The build centers around a commercially available PCB for mechanical switches, LEDs, and a custom acrylic enclosure.
Use the Leonardo as a Mouse
This lesson from YouTube teacher humanHardDrive outlines how you can use an Arduino Leonardo as a replacement for your mouse. While the tutorial mostly covers the basics, it gives the tools needed to add more interesting ways of controlling mouse-like motion sensing, joysticks, or even light!
Who is the Arduino Leonardo for?
The Arduino Leonardo is useful for both beginners and intermediate users alike. Its familiar form factor and Arduino shield compatibility make it perfect for simple projects, quick prototyping, and plug-and-play circuit building.
The USB HID element really opens up the possibilities of what you can do with a hobby dev board, and whether it's to learn about USB control from a high level or prototype a new HID device, it's a board well suited to getting a proof of concept going fast.
Arduino Leonardo vs. Uno
A common question when starting out is "Which Arduino should I buy?" While there are numerous variations, the Leonardo and Uno usually come up as answers - but which one is better?
In short, they both have advantages. The Uno is by far the most supported microcontroller development board available, and it's remained mostly unchanged so even older tutorial material is still mostly relevant. The Uno's ATMega328p chip is removable, making it easy to replace if the chip is somehow burned out or bricked.
The Leonardo, however, is cheaper, has more input/output options (3 more digital output pins, 6 more analog inputs), can act as a USB device, and is still among the most supported and documented development boards you can buy. The ATMega32u4 chip at its heart is soldered to the board so not easily replaceable, but realistically beginner Arduino users won't be replacing the MCU on the Uno either. This shouldn't really be something to consider unless you are on the tightest of budgets, and the ATMega32u4 is generally a better choice of MCU.
While the Uno has more tutorial material, the Leonardo really isn't far behind. Since most Arduino tutorials are largely interchangeable with a little tweaking, the Leonardo might actually be the better all-around board for all users.
The Arduino Leonardo represents everything the "basic" Arduino form factor can provide. High compatibility, almost limitless project potential, good documentation, and easy to get started with for beginners. It's one of the few development boards I would advise everyone to have around at all times as the ultimate quick prototyping tool, and it's perfect for teaching a wide curriculum of beginner DIY electronics and programming on too!