You’re looking for a small computer to power a laser turret that can shoot multi-coloured balloons – it’s a common situation we all find ourselves in at one point or another – and you’ve heard good things about both Arduino and Raspberry Pi. But you can’t decide – which the best mini-computer for your project? Which is going to prevail as the most useful once you’ve disassembled the turret thanks to that incident with the neighbour’s cat? Which could you play movies on? Don’t worry, James is here to explain all!
What’s The Difference?
The Arduino and Raspberry Pi may look quite similar – they’re both cute little circuit boards with some chips and pins on them – but they are in fact very different devices. The Arduino is in fact a micro-controller; not a mini-computer. A micro-controller is just a small part of what makes a computer, and only provides a subset of the functionality of the Rapsberry Pi.
Although the Arduino can be programmed with small C-like applications, it cannot run a full scale “operating system” and certainly won’t be replacing your media center anytime soon. The Raspberry Pi on the other hand, is a computer. If you’re reading this site, I’m just going to assume you know what that means.
Strengths & Weaknesses
So is the Arduino useless then? Hardly – an Arduino is perfect for electronics projects. It contains a set of input and output that can often be connected directly to components and sensors, and is incredibly easy to just jump straight into making something. This makes it ideal for prototyping things.
The Arduino runs the Arduino firmware – a basic bit of core software which allows it to communicate with a computer over USB and gives access to all the features. You generally wouldn’t replace this firmware, but it is possible. Once your application has been loaded, you can just plug it in anywhere and it’ll start working immediately – you don’t need to reboot, plug in a keyboard, or choose an application to run. It does the one job it’s been programmed to do, and it does it immediately.
The Raspberry Pi on the other is a complete, functional, mini-computer. It requires an operating system – the first thing you need to choose that will dramatically affect your experience – and has all the bits and pieces you might expect a full computer to have (just in a smaller scale). Storage is provided from a micro-SD card, while built-in Ethernet allows for networking (you can get networking on Arduino too, but it requires an add-on “shield”).
At the heart of the Pi is a Broadcom Arm-v6 CPU; it has memory, and a graphics processor driving the HDMI output. You can plug in a keyboard and monitor, load up Linux, and the less technically savvy might have no clue how tiny the machine driving everything really is. The Pi is an incredibly powerful platform in a very small package – perfect for embedded systems, or projects requiring more interactivity and processing power.
That said, the Raspberry is significantly more complex for simple electronics projects. For example, everyone’s first project is some derivative of flashing an LED on and off. On the Arduino, this involves connecting an LED and resistor to two pins, then uploading about 8 lines of code. That’s it. On the Raspberry Pi – assuming you have a fully functional operating system already installed and set up as you like – you then need to install some libraries to help you control the GPIO pins (that’s the bits you connect components to).
There are lots of libraries to choose from though, depending on which language you want to program in – including visual designers such as Scratch. WiringPi lets you write in the same language that Arduino is derived from. Finally, you may need to compile your app before running it. The point is, you can do nearly everything an Arduino can, on a Pi – but it’s more complicated.
Another important point to remember here is that Arduino is the most popular platform for electronics projects, so even though electronics projects are possible on Raspberry Pi (and there certainly are a few), you won’t find as nearly as many beginner tutorials to help you. It might be best to consider the Pi as an upgrade once you’re ready to handle bigger and more demanding projects.
On the other hand, the Raspberry Pi is a mini-computer, the Arduino isn’t. To understand that point a little more clearly, here’s a small selection of operating systems you can install on the Raspberry Pi:
- Raspian (based on Debian linux, and the “default”).
- Android (barely, but official support is coming).
- Plan 9.
- Xbox Media Center.
And here’s a list of operating systems you can install on the Arduino:
WAIT! Why Choose At All?
Actually, you can have the best of both worlds; the Pi may be a more complex Arduino, and the Arduino can’t nearly handle as much as the Pi – but have you considered using them together? This project – AlaMode – puts a stackable Arduino clone directly on top of the Pi, giving instant access to all the usual Arduino functions.
Or if Python is more your thing, just plug your Arduino into the USB of your Pi and use this interface.
I hope you’re clearer on the differences between Arduino and Raspberry Pi now, but if not, the comment form is but a few hundred pixels away and I’d be happy to help where I can.