Arduino Leonardo and Cool Term – what’s it good for?

September 1, 2023 Off By Anna Katherina Ibeling

Everyone who already used open-source solutions for IT projects surely knows Arduino and Arduino Leonardo. Or, more pragmatically: It is very difficult to get around them as a cost-efficient allround development platform. While we already presented a basic overview on the Arduino ecosystem, let’s take a closer look at three special aspects now. What do professional programmers use Arduino for? How does Arduino Leonardo help you out and why do R&D teams enjoy working with Cool Term?

Arduino Leonardo: ein wichtiges Element des Arduino-Systems
Arduino Leonardo: an important part of the Arduino ecosystem

Arduino is “everybody’s darling“ among most open-source programmers and it definitely offers a lot of features making it popular. As a full open-source electronics platform, Arduino provides a wide range of tools and resources for creating interactive projects, prototypes, and various electronic devices. Due to its (relative) simplicity and coherence, it is accessible to beginners and experienced makers alike. Arduino Leonardo, which we’ll focus on later in this post, naturally stands out as an important puzzle piece within the system. But first things first … Let’s find out about some “typical“ user scenarios. There are a lot more, for sure.

Prototyping, electronics education and programming practice

Arduino is a great platform for learning about electronics and programming. It allows you to easily connect various electronic components (sensors, motors, LEDs, etc.) and experiment with creating circuits. The popular open-source platform uses a simplified programming language, which is based on C/C++. In consequence, this makes it a good way to learn programming concepts and practices.

Custom electronics projects in many branches

Worldwide, many businesses already profit from Arduino to build custom electronic devices tailored to your specific needs. This could include anything from weather stations and home automation systems to interactive art installations and wearable technology.

Robotics and IoT (Internet of Things)

Among other contexts, Arduino is commonly used in robotics projects. You can control motors, servos, and other components to create moving robots and robotic arms. Usually, all newer Arduino boards can be connected to the internet, enabling you to build IoT devices. Further, you can create smart home systems, remote monitoring devices, and more. By the way, also our partner companies use Arduino for their robotics development!

Arduino ist die ideale Plattform, um Programmierkenntnisse zu teilen und zu erweitern
Arduino offers many options to enhance your programming skills

Sensor integration, data collection and analysis

Arduino supports a wide variety of sensors such as temperature, humidity, motion, light, sound, and more. You can collect data from these sensors and use it for various applications. You can build data collection systems that gather information from the environment or other sources, and then process and analyze that data. As a side note, Arduino sensors also are an integral part of our partner company’s Ardumower and robotic projects.

Interactive art and installations

Open-source programming is not only for IT and industrial purposes. In contrary, many modern artists create Arduino projects in the creation of interactive art installations, sculptures, and exhibits. Using this technology allows them to incorporate technology and interactive surprises into their work.

Wearables and smart home tools

Due to its compact size and low power consumption, Arduino devices are used in wearable technology projects like smart clothing, fitness trackers, and gesture-controlled accessories. Furthermore, you can use Arduino to create home automation systems, controlling lights, appliances, and other devices remotely.

Boards wie der Arduino Leonardo lassen sich auch Wearbales einbauen
Boards like Arduino Leonardo are often integrated in high-tech components like wearables

Prototyping for businesses

Many businesses use Arduino for rapid prototyping of their electronic products. This practical open-source system allows them to quickly test concepts and functionalities before moving on to more complex and expensive development stages.

Sharing know-how and connecting developers in the Arduino system

Arduino is widely used in educational settings, from schools to workshops and makerspaces. Its accessibility and versatility make it a popular choice for teaching electronics and programming.
Arduino has a large and active community of users and developers. This means you have access to a wealth of tutorials, example projects, and support resources.

In essence, Arduino is a versatile platform that empowers you to turn your creative ideas into functional electronic projects, regardless of your level of expertise. It’s a valuable tool for hobbyists, students, educators, artists, and professionals working in various fields.

Arduino Leonardo in action – some common examples

The Arduino Leonardo is one of the Arduino boards that uses the Atmega32U4 microcontroller. It’s unique because it supports “native” USB communication, which means it can act as a USB HID (Human Interface Device) like a keyboard or mouse, and it can also emulate a USB serial port for communication with a computer.

Arduino Leonardo- hilfreich bei kleinen und großen IT-Projekten
Arduino Leonardo- a versatile helper for small and big IT projects

Arduino Leonardo for serial communication

Like many other Arduino boards, Arduino Leonardo has multiple digital pins that can be used for serial communication. Usually it comes with a built-in USB-to-serial converter, so when you connect the board to your computer via USB, it creates a virtual COM port that you can use for serial communication.

Serial monitor with Arduino Leonardo

The Arduino IDE (Integrated Development Environment) includes a built-in serial monitor tool. When you upload a sketch to the Arduino Leonardo that involves serial communication, you can open the Serial Monitor from the IDE. This allows you to send and receive data to and from the Arduino board via the USB connection.

Arduino Leonardo as a terminal

In general, you can program the Arduino Leonardo to read data from sensors, buttons, switches, or other inputs. They you are also able to send this data to the computer over the USB serial connection. On the computer side, it is common to use a serial terminal application (such as PuTTY, Arduino IDE’s Serial Monitor, or other third-party tools) to view the data being sent by the Arduino. This is useful for debugging, monitoring sensor readings, or interacting with your Arduino-based project in real-time.

Keyboard and mouse emulation with Arduino Leonardo

The Leonardo’s ability to act as a USB HID device can be used to create applications where the Arduino simulates keyboard or mouse actions. For instance, you could program it to send specific keyboard shortcuts or mouse clicks to your computer. Generally, you can utilize the Arduino Leonardo’s USB serial communication capabilities to create a terminal-like interface between the board and your computer. You can send and receive data, monitor sensor readings, and even emulate keyboard or mouse actions using this functionality.

Einstecken, verbinden, Knopf drücken: Boards wie der Arduino Leonardo finden auch in unseren USB-Pushbuttons Verwendung
Plug in, connect, go! Also our USB pusbuttons contain a programmable board like Arduino Leonardo

Features and functions of Arduino Leonardo

Arduino Leonardo is a recent microcontroller board. It’s part of the Arduino family of development boards and is unique in its ability to directly emulate a USB Human Interface Device (HID) like a keyboard or mouse. Thus, this board is a perfect match for projects involving input devices and human-computer interaction.

Using Arduino Leonardo as a microcontroller

Let’s take a look beyond the surface, then. The heart of the Arduino Leonardo is the ATmega32U4 microcontroller. This chip contains a CPU, memory (both flash and RAM), digital and analog I/O pins, timers, and various built-in peripherals. It’s the brain that executes the code you upload to the board.

Connecting your Arduino Leonardo to a USB port

Among others, one of the standout features of the Arduino Leonardo is its native USB connectivity. Unlike other Arduino boards that use external USB-to-serial converters, the Leonardo has an embedded USB communication chip. This enables the board to directly communicate with a computer via USB without needing additional drivers.

Profiting from Arduino Leonardo’s USB HID emulation

This is a key feature of the Leonardo. It can emulate USB HID devices like keyboards, mice, and game controllers. This means you can program the Leonardo to send keystrokes, mouse movements, and button presses to a connected computer. Thus, the USB tool effectively controls the computer’s input like a physical keyboard or mouse “with a push“. By the way: This is how our USB pushbuttons and USB pushboxes function, too!

Einfache Routinen per Knopfdruck- mit einer USB-Pushbox und Arduino Leonardo
Autmatizing routines with a USB pushbox (Arduino Leonardo or similar board inside)

Programming your Arduino Leonardo individually according to your purpose

Normally, you program the Arduino Leonardo using the Arduino IDE (Integrated Development Environment). The IDE provides a simplified programming environment and a C/C++-like language. When you write your code and upload it to the board, ATmega32U4’s stores it in its flash memory.

Using Arduino Leonardo as a serial device

Your Leonardo can also communicate with the computer as a serial device. It has a built-in hardware UART (Universal Asynchronous Receiver-Transmitter) that allows it to send and receive serial data. This is useful for debugging, data exchange, and communication with other devices.

Digital and analog I/O with Arduino Leonardo

Arduino Leonardo has a variety of digital and analog pins that you can use to connect to sensors, actuators, and other external components. All of these pins can be configured as inputs or outputs, allowing you to interact with the physical world.

Pins und Sensoren - jedes Board ist ein Kunstwerk für sich
Pins and sensors - every Arduino board is a small universe of its own

Various libraries and a big community for Arduino

Arduino has a vast library ecosystem and an active community. This means that for most common tasks, you can find pre-built libraries that make coding easier. Furthermore, develoüpers (to be) can profit from a wealth of tutorials, guides, and forums where you can seek help or inspiration.

Arduino Leonardo as a basis for interactive applications

The Arduino Leonardo’s unique HID capabilities make it suitable for a wide range of projects. Some common examples are keyboard emulators, MIDI controllers, input devices for interactive installations, game controllers. Of course, these scenarios are just one slice of the pie.Talking about pie: Arduino is also an all-in-one solution for Raspberry PI projects-

Typical workflows with Arduino Leonardo

To work with the Leonardo, you typically follow these steps:

  • Write or modify code in the Arduino IDE.
  • Connect the Leonardo to your computer using a USB cable.
  • Select the board and port in the IDE.
  • Compile and upload the code to the Leonardo.

With compilation and code upload being complete. Arduino Leonardo executes the uploaded code. The board then interacts with connected components or the computer.

Die Programmierumgebung von Arduino - immer da, wo Sie sind!
The Arduino work environment -easily accessible from wherever you are!

Cool Term and Arduino Leonardo – a “cool“ match

Do you want to further simplify programming your Arduino Leonardo or other boards? Cool Term is a cross-platform software for serial communication. For this purpose, the tool provides a user-friendly interface for establishing and managing serial connections between your computer and various devices. This includes microcontrollers like Arduino, sensors, GPS modules, and many more devices. Commonly, developers use Cool Term primarily for monitoring, controlling, and debugging serial data transmission. Here are some key features and aspects of this versatile helper.

Serial communication with Cool Term

Cool Term allows you to establish serial connections using different communication parameters such as baud rate, data bits, stop bits, and parity settings. This makes it versatile for working with a wide range of devices that communicate over serial ports. In order to find out more about Cool Term’s serial functions and user scenarios, take a look at the original documentation.

Data monitoring and logging

You can use CoolTerm to monitor and display data being transmitted between your computer and connected devices in real-time. This is especially useful for debugging and understanding how your devices exchange relevant data. So you can replicate and change the processes documented via logging.

Cool Term’s data display options, text and hex modes

Cool Term provides options for displaying data in different formats, such as ASCII, hexadecimal, decimal, binary, and more. This helps you visualize and interpret the transmitted data more effectively. In order to analyze the content of the communication, you can switch between text mode (for displaying human-readable characters) and hex mode (for viewing raw hexadecimal data).

Code lässt sich in vielen Formaten darstellen
Code comes in different shapes and sizes

Sending and logging data via Cool Term

Cool Term allows you to send data manually to the connected device. In some contexts, this can be helpful for sending commands or configuring devices that require specific data input. You can save the data exchanged during a serial session to a text file. This is valuable for recording communication sessions for later analysis or documentation.

Customizing the terminal interface

You can customize Cool Term’s appearance by choosing themes, adjusting font settings, and configuring colors to suit your preferences. So it is possible, for example, to adapt the interface to different programming devices and light settings.

Capturing data into text files with Cool Term

You can capture the data displayed in the terminal window and save it to a text file. This “translation“ helps you creating records of your serial communication sessions. In consequence, you can use the logs again, e.g. for documentary and debugging purposes.

Egal, auf welchem Gerät Sie programmieren - Cool Term passt sich an!
The Cool Term interface adapts to many programming devices

No hotkeys and click-work thanks to keyboard and mouse emulation

The free terminal Cool Term has features for simulating keyboard input, which can be useful for testing input scenarios or automating tasks. For sure, there are a lot of IT routines you might want to optimize and automatize. In fact, there’s a wide array of projects starting from small smart-home systems and trade show gadgets up to complete production processes.

Cool Term as a "one for all" open-source terminal

Cool Term is available for Windows, macOS, and Linux file systems. Furthermore, you can get the terminal as an open-source software. So you can use it for free while contributing to its development if you have programming skills. All in all, this terminal solution is particularly popular among makers, engineers, and open-source developers who work with hardware projects that involve serial communication. Whether you’re working with Arduino, Raspberry Pi, or other microcontrollers, Cool Term helps to establish, monitor, and troubleshoot serial connections efficiently.


Naturally,  there are also some alternative tools working in a similar way. Last and least, combining Arduino with Cool Term surely leads to a win-win situation in open-source development.