Let's take a second look at the Arduino Leonardo with Andrew Shepherd.
This is a guest blog post from Andrew Shepherd. Andrew has been studying electronics in earnest for over a decade and loves working with his mind and hands. He specializes in analog electronics, but his interests are eclectic and span seemingly unrelated areas.
The Arduino Leonardo came out a few years ago but somehow flew under the radar to most people. There are rather few blogs and tutorials written about it around the web. Older boards like the Duemilanove, Arduino Uno and their clones are so ubiquitous that they are used in most projects where a basic microcontroller is needed. Later models like the Due and Yun fit the bill for more complicated computational needs. The Leonardo sits between these two extremes. It is more useful and more powerful than a standard Uno with the ATmega328 chip. It uses a different chip (ATmega32u4), which has a built in USB interface among other things. The cost is nearly the same as a ATmega328 model Arduino (like the Uno or Duemilanove), but is more capable.
A very common way to use the Leonardo is to create a circuit that can press keys on your keyboard – for instance if you wanted some piece of hardware to trigger a repeatable event on screen. Maybe you want to advance slides in a PowerPoint presentation by pressing one of the arrow keys; it would be ideal to press the key by a serial command instead of a servo or solenoid pushing it. Any device using the ATmega32u4 chip and the keyboard library makes this a simple task.
A slightly more sophisticated use of this feature would be to make a controller or some sort of haptic device to control a p5 script or even a video game. There will not likely be a shortage of pins, since there are 20 available and 12 of those can be analog. You can experiment with new types of user interfaces and not worry as much about getting it to talk to your computer. In fact, the Arduino Esplora is basically a Leonardo in the form of a controller designed exactly for this purpose.
SparkFun Fio - Similar to the Micro/Pro Micro but is LiPo battery-compatible and is even capable of charging the battery when plugged into a USB port. It also has an XBee socket for wireless capability in a small package.
Qduino Mini - Like the Fio, it can charge your battery, but it also has RGB LEDs and a library for a “battery fuel gauge.” Naturally, it’s slightly smaller than the Fio because it doesn’t have the XBee socket.
Arduino Esplora - It’s similar to a Leonardo but in the form of a video game controller. It has built-in buttons, a joystick and some other built-in hardware.
Arduino Yun - Basically Arduino’s attempt at a Raspberry Pi since it runs Linux. The ATmega32u4 is most likely ancillary and used for its serial communication capability.
LilyPad USB - Probably the smallest device listed here. Designed specifically for fabrics and wearable devices. They sell a 3.3V version so it can run from a single cell 3.8V LiPo battery.
Unfortunately, the ATmega32u4 chip does not come in a thru-hole package unlike the ATmega328. This might be a problem if you ever want to “roll your own” Arduino for size or cost purposes. However, the price for a Leonardo or similar device is comparable to that of an Uno, and the size can be made quite small with the Micro or LilyPad. In this regard, the inability to easily roll your own is almost a non-issue.
Because the Leonardo has a different chip than the Uno, there will be some slight differences when it comes to compatibility. Certain shields and libraries might have discrepancies when used on the Leonardo. Usually, pre-existing products and libraries make sure to mention somewhere if they can be used or not. If you are planning on making your own libraries or shields however, be aware of the slight differences as you plan your design.