Arduino
FAQ
Break out of the cyber confines of your computer, and program the real world.
Q Ard-You-I-Know. What does that mean?
A It's pronounced Ard-wee-no, and it's an open source microcontroller board that's often used to control embedded systems and robotics (Figure 1).

Q Ah, so it's like a Raspberry Pi?
A Well, yes and no. There are certainly some similarities (it's a similar size, and both have programmable input and output pins that you can use to control external hardware), but there is one very big difference, and that's the processor at the heart of it.
The processor in a Raspberry Pi is a fully featured CPU capable of running a normal desktop operating system like Linux. It's not the most powerful CPU around, but it can do just about anything a more powerful chip can do, just a bit slower. The processor in the Arduino is much more limited. It doesn't have any graphics, or even a memory management unit (MMU), so it's not really capable of the sort of multithreading cleverness that's needed to run a modern operating system like Linux.
Q So if it can't run Linux, what does it run?
A In a sense, it doesn't run any operating system. It comes with a bootloader already programmed into the chip, and this just runs the code that's stored in the chip's internal memory. The clever bit is that you can upload more code to it via USB. In many ways, it functions more as a peripheral than a computer, but purists would argue that it fulfills all the requirements of a computer in itself. (I would argue that so do many peripherals, and it's common for hard drives, WiFi adaptors, and more to come with far more capable computers than the Arduino has, but that's an argument for another day.)
The important bit to remember is that it's a programmable thing to which you can upload code from a computer but that doesn't itself come with any more capabilities than to connect over USB and listen for more code.
Q If all I can do is connect it to my computer and run code on it, why should I bother? I can already run code; I don't need another place to run software.
A The great thing about the Arduino is that while you need it to be connected to the computer to upload code, you don't need to be connected to run it. The code is stored in flash memory that's on the Arduino, so once the code is uploaded, it will run whenever you provide power to it. Essentially, it's for creating embedded computing environments. This is particularly useful when you use the input and output pins to interact with the real world.
Q Input and output pins? What are they?
A They're connectors that you can turn on or off. They can connect to LEDs, buttons, motor drivers, or just about anything else to allow your programs to either understand or influence the world around it.
Q I know nothing about electronics, so how would I go about using these pins?
A Things called shields plug directly into the Arduino pins to provide some out-of-the-box functionality. Although, having said that, the sort of simple electronics needed to wire up things like LEDs or buttons is not complicated, and you could grasp it quite quickly with just a few pieces of inexpensive equipment.
Q This Arduino thing sounds a lot like a Raspberry Pi, just without the ability to run Linux. Why exactly should I learn a whole new platform?
A The Raspberry Pi and the Arduino do have a lot of features in common. If you're coming to the world of physical computing for the first time, you're probably going to end up using one of these two products. The main difference in our opinion is the operating system. The Raspberry Pi has a complete Linux system that gives you wonderful capabilities for doing everything from running powerful fully featured web and database servers to programming in a wide range of languages and editors. The downside is that this adds a lot of complexity to the system, with more to go wrong, and more to worry about. In an embedded situation, this can mean things like worrying about startup times and data robustness if users power off rather than shutting down. The Arduino, on the other hand, has much less to go wrong. All the code on it is code you've added, so it should start up instantly; the filesystem shouldn't be touched, so you shouldn't have problems with hard shutdowns; there should be far fewer security issues to worry about; and so on.
Both platforms have pros and cons, but my general advice is to stick to the Arduino unless you definitely need the extra power of the Raspberry Pi.
Q How do I program the Arduino?
A A special IDE contains a text editor, project manager, compiler, and uploader (Figure 2). As far as the Arduino is concerned, this does everything. It's open source, and you can get it from the Arduino website [1].

Once you've got that, you can browse examples and get to work. The code is written in a dialect of C++ similar to Processing. It's all fairly straightforward for anyone with any coding experience, and you'll find loads of examples, both included with the Arduino software and online.
Q So how did the Arduino come about?
A A very brief history is that it came out of the Interaction Design Institute Ivrea, a school in Italy. There, a group of supervisors and students created the boards to make it easier for students to work with interactive design. There's been a bit of turmoil since then, and the history of the various organizations looks like it might have been written for a soap opera, but the end result is that official Arduino hardware is now produced by Arduino LLC.
Q You say "official" Arduino hardware. Does that mean that there's unofficial stuff as well?
A Yep, and in a variety of forms. Since the hardware and software is all open source, other people have been able to build off the platform. This varies from direct clones (often of poor quality) that are for sale on various websites, to boards that have added functionality to the original boards while still remaining compatible with software (and sometimes hardware, too).
Q Are there different official versions of the Arduino board?
A Quite a few, yep. There are two big things to consider when picking a board: 5 volts or 3.3, and the layout of the pins. Both of these things affect what hardware you can attach. Generally speaking, 5 volts is older and 3.3 volts is newer, so unless you happen to have a stack of old 5V hardware, you're probably better off going for a 3.3V board now. The second thing is the physical layout of the pins: The Uno-style layout (which used to be the standard) shows up on the Arduino Uno and Zero; other styles on other models are better suited to breadboarding. For now, more shields are in the Uno style, but if you're looking to develop your own hardware, one of the other form factors might be more useful.
Fantastic. I'm off shopping for my first Arduino.
Infos
- Arduino: https://www.arduino.cc
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Direct Download
Read full article as PDF:
Price $2.95
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
News
-
Mageia 9 Beta 2 is Ready for Testing
The latest beta of the popular Mageia distribution now includes the latest kernel and plenty of updated applications.
-
KDE Plasma 6 Looks to Bring Basic HDR Support
The KWin piece of KDE Plasma now has HDR support and color management geared for the 6.0 release.
-
Bodhi Linux 7.0 Beta Ready for Testing
The latest iteration of the Bohdi Linux distribution is now available for those who want to experience what's in store and for testing purposes.
-
Changes Coming to Ubuntu PPA Usage
The way you manage Personal Package Archives will be changing with the release of Ubuntu 23.10.
-
AlmaLinux 9.2 Now Available for Download
AlmaLinux has been released and provides a free alternative to upstream Red Hat Enterprise Linux.
-
An Immutable Version of Fedora Is Under Consideration
For anyone who's a fan of using immutable versions of Linux, the Fedora team is currently considering adding a new spin called Fedora Onyx.
-
New Release of Br OS Includes ChatGPT Integration
Br OS 23.04 is now available and is geared specifically toward web content creation.
-
Command-Line Only Peropesis 2.1 Available Now
The latest iteration of Peropesis has been released with plenty of updates and introduces new software development tools.
-
TUXEDO Computers Announces InfinityBook Pro 14
With the new generation of their popular InfinityBook Pro 14, TUXEDO upgrades its ultra-mobile, powerful business laptop with some impressive specs.
-
Linux Kernel 6.3 Release Includes Interesting Features
Although it's not a Long Term Release candidate, Linux 6.3 includes features that will benefit end users.