The hobbist world in polarized. Let’s see what is the Difference between Arduino and Raspberry Pi, analyze what one or the other does better or worse.
This is a question people ask and answer a lot, what can I do with one or the other?. Even better, what can’t I do?. I will try and answer that to you once and for all.
What we have to understand first is what each board was originally intended for, what is its purpose. Based on its history and processing power, we can assume that Raspberry Pi is more of a computer. A device that can be used as a general purpose machine to execute computational loads.
This includes for example computer vision, machine learning, running Python, etc. Also it means having interfaces for mouse, keyboard, webcam, printers. On a Pi you can browse the internet, watch netflix and much more.
Arduino on the other side is (in a broader sense) a microcontroller, which means it has limited processing power and not necessarily (but it can) interface with mouse, keyboard, monitor, etc.
A microcontroller by definition is a computer on its own, having (or carrying) memory, IO, communication interfaces. It is just that it has very little memory, often limited by its number of bits (say 8bit technology for example).
Its RAM memory is just 2kB, against the many GB present in some Raspberry Pi (and even more on desktop PC).
Hardware differences
Being a microcontroller, Arduino is made to basically interface with the world around it. Analog inputs are present in most (if not all) Arduino models, be it 3.3V ou 5V. They are modules inside the microcontroller designed to receive analog values and translate it into bits.
Raspberry Pi does not have analog inputs, instead it relies on external chips to do this job. The MCP3008 chip can be used to achieve such feat. Another very important difference between a computer (like the Pi) and a microcontroller is the uC’s ability of working “real time”.
Means it can (at least some Arduino models can) process stuff in a deterministic and fast way, guaranteeing that some function wil be executed. That is different from the Pi, whose operating system based in Linux is not real time.
Software differences
Arduino codes are generally (meaning always) compiled to machine language (assembly then hex) before being flashed into the chip. The chip has a bootloader, which is an area of memory responsible for making it more “friendly” for USB programming, among other things.
All code is verified in compilation time, which in theory makes it safer for execution. The Raspberry Pi on the other hand runs Linux, which is also compiled.
Differently from Arduino, the Pi offers a full operating system to the user. Meaning it can choose to run compiled (executable) or interpreted scripts.
So… what is the difference between Arduino and Raspberry Pi?
It can be summarized as such: Arduino serves more the “edge”, reading sensors and controlling actuators. Meanwhile Raspberry Pi has more processing power, acting as the high level “brain” of a system.
A nice example of the difference is machine learning: you can run full ML on the Pi, while in Arduino you will run tinyML. Another example is the MQTT protocol, you can have a MQTT server on the Pi. On Arduino you will gather data and send it over to the Pi for processing.
What is a thing you can do with both?
One example of thing is can do with both is model Aircraft, drones and RC cars. The Pi zero and Pi Pico are low power enough you can use for those applications.
Another example is running “Python”. There is a port of microPython for ESP32 (which is a microcontroller). You can of course program in Python on the Pi.
That concludes today’s lesson, I hope you enjoyed it and please comment below if any question arise. See you soon.
Leave a Reply