A comparison between Arduino and Pi
I bought an Arduino last year to have some fun with electronics. It was (is) great. So I wanted to learn about
the Pi, and compare the two. I am using the latest Pi 2 (2015 model), with quad-core CPU and 1Gb RAM.
The differences between an Arduino and a Pi is important - which should you choose ?
The technical difference
An Arduino is a chip on a board, with input pins to plug sensors into. It has 32K RAM (small, but just fit for purpose).
It has no graphics output, no keyboard, no mouse. It communicates with an existing PC via the USB cable; you use your
PC to program the Arduino, and you plug sensors into the Arduino.
A Pi is a complete (albeit small) computer in it's own right. It requires a HDMI monitor, USB keyboard, USB mouse,
and internet access (wifi or ethernet network connection).
It runs the latest version of Debian Linux. It has 1Gb RAM and has HDMI graphics output.
The practical difference
plugs into an existing PC and communicates via the USB port. An Arduino is not a complete computer; it is a
single chip mounted on a board.
Programs are developed on your existing PC, and uploaded to the Arduino chip via the USB port.
You plug sensors into the Arduino; the uploaded program reads the sensors and does things.
It's great for
plugging sensors into, there is a website (arduino.cc) full of documentation, and many other websites give discussions
and usage tips. There is nothing to update or upgrade - it's a hardware chip running on a board that you cannot
(and don't need to) change.
You only have to install the
Arduino development program (the IDE, Integrated Development Environment) onto your PC,
and then plug the Arduino into the USB port.
This chip is also available on smaller and cheaper boards (eg Arduino Pro Mini, about £5),
so you can develop a program using the normal Arduino, and then transfer the whole system to a permanent and small
installation. I have created two mp3 players and a robot car like this. It's a lot
of fun, very instructive and informative. (Highly recommended, btw.)
The programming language is very similar to C, it's easy to learn and you don't have a choice of programming languages.
The pins are clearly labelled on the Arduino itself, so it's hard to make a mistake here when you plug something in.
The pins on the Pi are not labelled on the board - some people have created templates that you can print out and stick
on, or you can buy a breakout board (recommended) that is labelled and connects to a normal breadboard.
An Arduino kit usually comes with a couple of starter sensors, and some wires; everything you need to get started.
is a complete computer in it's own right, running the latest version of the operating system,
Debian Linux. It uses wifi to connect to your home network. It has it's own internet browser;
you can check your emails; you can use it as a media centre PC in your home; it does everything that any
linux PC will do, with the added advantage of being able to
plug sensors into. The same sensors are used for both the Pi and the arduino, btw.
It requires an internet connection to install new software, as any PC does.
In the early days, you will need an HDMI monitor (your tv maybe ?) and a USB keyboard and a USB mouse and a wifi dongle.
As you gain confidence, you should be able to unplug the monitor, the keyboard and the mouse, and control the Pi using
your existing computer using ssh and VNC. (More on VNC later).
There are several programming languages (most common are C or python or bash shell scripting).
My Pi kit came with a power adapter (essential), an 8Gb SD card, with NOOBS on (recommended). NOOBS enables you to
press the shift key while booting and reinstall Raspbian or Media Centre from scratch - highly recommended.
I had a couple of spare 8Gb SD cards as well, so I
installed and tested Raspbian and the Media centre on those also. My kit came with a plastic case for the Pi, which I
recommend using. I bought the T-shape GPIO breakout (I also recommend this).
An arduino teaches you electronics and you develop the code for those electronics
using a program (called the Arduino IDE) on your PC.
The Pi teaches you how to code a computer, using a linux based operating system. When you make a mistake, or simply
want to start again from scratch for any reason, it's simple to reinstall and start again.