Arduino is not always the best solution to a problem. Sometimes it is better to use another tool to get the job done. Figuring out these situations is often the job I do as an engineer: Assessing the advantages and disadvantages of different tools (such as Arduino).
The disadvantages of Arduino, particularly compared to Raspberry Pi, are listed in this guide:
1. Cannot run more than one program at the same time
An Arduino can only run a single sketch or app at a time.
There is no built-in functionality on an Arduino to run multiple sketches at the same time. Typically an operating system provides this multitasking functionality – such as the Raspberry Pi OS for the Raspberry Pi.
Multitasking is the term used when a computer is able to run more than one piece of a code at a time. This was one of my favourite lessons when I studied operating systems at university.
Even though a CPU can only do one thing at a time (back then we really only had single-core CPUs), the operating system can schedule different pieces of code to run so that it feels like the computer is doing many things at once. This is how you can have your web browser open, and your email, and a video playing in the background without the computer slowing down (especially helped by now we have multi-core CPUs which can do many things simultaneously).
2. No memory safety checks
An Arduino sketch can read and write pretty much every piece of memory on the Arduino board. There is no function to stop a sketch from reading particular parts of memory.
Unsafe memory use in a sketch can cause an Arduino to crash. I wrote a guide on how to crash your Arduino with unsafe memory use here: chipwired.com/arduino-crash-hang-guide/
A lot of freedom is given to a sketch by not restricting any read or write of memory. It also allows these reads or writes to happen faster.
Memory safety is another feature of an operating system, such as the Raspberry Pi OS (or Windows for that matter). An operating system stops your code from looking at the memory allocated for other pieces of code – including operating system code and other apps which might be running at the same time. Trying to access the protected memory results in the app crashing, rather than the whole board crashing.
3. Expensive for the CPU power and memory
Arduino costs more per megabyte of memory and per cycle (Hz) of processing power, when compared to a Raspberry Pi.
The table below compares some of the common Arduino models with a Raspberry Pi:
|Memory||32 KB||256 KB||2 GB|
|CPU||16 Mhz||64 Mhz||1500 Mhz|
|Memory per $$||0.001 MB/$||0.0128 MB/$||57.14 MB/$|
|CPU per $$||0.70 MHz/$||3.2 MHz/$||42.86 MHz/$|
This is an unfair comparison. I wouldn’t recommend an Arduino to perform the same tasks a Raspberry Pi can. And I’ve seen many projects where shaving even 1 dollar off the cost is important; there’s no need to over engineer a product if a slightly cheaper board will do the job.
If you need a small board that’s good at general purpose computing (can be used for many functions), then a Raspberry Pi is a good option.
If you need a small board that’s good for a specific task (like data collection), then an Arduino can help save the project money.
4. Lack of built-in communications
Most Arduino boards do not come with Bluetooth or WiFi. WiFi and Bluetooth chips typically add $10-$20 to the cost of a board, so Arduino offers some boards with this functionality and some boards without.
The cheapest Arduino I’ve seen with Bluetooth and WiFi is the Arduino Nano 33 BLE, which costs approximately $21. A comparable Arduino without Bluetooth and WiFi (the Nano Every) costs approximately $11.
I’ve written complete guides on which Arduino boards come with WiFi and Bluetooth, and the costs involved. Check them out here:
- WiFi Arduino guide I wrote here: chipwired.com/arduino-board-wifi-guide/
- Bluetooth Arduino guide I wrote here: chipwired.com/arduino-bluetooth-built-in/
Adding Bluetooth or WiFi is also possible using a shield, for roughly $20 each (i.e. $20 for Bluetooth and $20 for WiFi). I’ve also seen third party shields around the $10 mark.
Compared with the Raspberry Pi, which has Bluetooth and WiFi built in at its $35-$75 price point.
5. Lack of built-in peripherals
Arduino does not typically support peripherals out of the box. This means that unless programmed to do so, Arduino doesn’t have real support for:
It can be quite easy to add support for these peripherals to a sketch: Add the library and follow the documentation for that library. I’ve found displays in particular to be very easy to add to Arduino (I haven’t found a mouse or keyboard useful for most Arduino projects).
As a Raspberry Pi must be programmed with a full operating system, such operating systems typically come with support for common USB peripherals – mouse and keyboard. A full operating system also supports full communication with a screen display.
6. Limited number of programming languages
Nearly all Arduino programming is done in the Arduino C/C++ style language. There is some support for Python and Rust, however these languages do not enjoy all the benefits that make them good options for programming higher-level applications.
I’ve found having only one real option for programming language makes it easier for beginners to learn about programming microcontrollers.
However, I’ve also found that it can be a bit of an adjustment for some programmers more accustomed to higher-level languages (like Python) to then have to start thinking in C++ for Arduino.
7. Limited number of IDEs
I’ve found there are only really two IDEs designed to work with Arduino:
- The official Arduino IDE, and
- PlatformIO, a third-party IDE designed for IoT boards.
There are other options available, though typically these come in the form of an Arduino plugin for another IDE. In particular, Eclipse (no longer maintained!) and Visual Studio Code have support for Arduino. I’ve found support for these isn’t as good as the official Arduino IDE or PlatformIO however.
Dozens of IDEs are available for programming a Raspberry Pi. You can use a wide variety of text editors, compilers, and integrated environments supporting a similarly wide variety of languages. This is one of the advantages of running a general purpose operating system – there are a lot of options available!
8. More difficult to choose a board for beginners
I found it difficult to choose which Arduino to buy when I first started out. There are many Arduino boards to choose from – some have WiFi and Bluetooth, some have very powerful processors, and some seem to be more expensive but offer less features!
When I first started with Raspberry Pi, there were only 2 options available to me: 4GB of memory or 8GB of memory.
Chris is an engineer who often has to make decisions about buying the right tool for the job. He loves to avoid “over engineering” scenarios by choosing something with the right amount of specs, rather than ‘going overboard’.