Something that crops up from time to time with people wishing to enter the world of single board computers is what to start off with. There is no right or wrong answer in this. The Raspberry Pi and Arduino are very different beasts that can be used in very different ways, although they also share a large common ground in what they can be used for.
What are they:
Essentially the Raspberry Pi is a fully featured single board computer. It has a processor, R.A.M, storage (via SD card), USB, ethernet, sound processing and can connect to a display via composite or HDMI, the Pi also requires an operating system to do anything, this is available in various forms of Linux and even android.
The difference with the raspberry Pi against a standard, run-of-the-mill single board computer is that the Pi features a GPIO (General Purpose Input/Output) port.
GPIO allows you to create programs that connect to the real world, you can write programs that read a sensor input from a GPIO pin and depending on the result output a trigger from another GPIO pin. For example, you could get a reading from a thermometer on one pin, if the temperature drops below 18Oc a heater is triggered until the desired temperature is reached. GPIO has many uses, readings can be taken from almost any sensor imaginable, similarly triggers can be sent to almost any output you can think of.
- Can be programmed using a large range of languages. As the Pi has an operating system you can install the libraries for any language available for *nix such as: Python, Perl, PHP, Ruby, C and so on.
- The Pi has amazing graphics support, despite it’s ARMv7 700MHz processor and 512MB RAM it is capable of displaying 1080p video with ease. Due to this a Pi can create a very minimal HTPC.
- 26 GPIO pins (40 on the A+ & B+) allow connection to a wide range of real-world devices.
- USB ports allow connectivity with a wide range of devices, from mice to wireless networking.
- Although the operating system allows for versatility in languages it also limits speed. Once turned on the Pi will need to start up the operating system before it can begin performing it’s allocated tasks, all code will then need to be converted to ‘computer language’ via the interpretor in order to run.
- SD cards become corrupted easily. I’ve own’d a couple of Pi Model B (the old version) boards for a few years now and have had a few corrupted SD cards, the cards are still usable, you just have to re-install the operating system and start again.
An Arduino is a single board computer on the basis that is has a processor, R.A.M, and storage (built in flash memory) although on a much smaller scale than the Pi, for example the Arduino Mega 2560 has a 16MHz crystal oscillator, 8KB or SRAM and 256KB of flash memory. Despite the Arduino’s very low specifications it is still a very powerful machine.
The Arduino Mega 2560 has 16 dedicated analogue input pins, opposed to digital input pins an analogue pin will register 0.0v, 0.1v… 5v as different values. For example a microphone is an analogue device, it can output a wide range of values. The Mega 2560 also features 54 digital input/output pins, the digital I/O pins can similarly read values from sensors, although unlike the analogue pins, these take readings of either on or off (true or false).
There is no operating system for an Arduino, except for the 8KB of flash memory that is reserved for the boot loader, in essence the operating system is created by you. Arduino provide an editor that can be downloaded from their website for various operating systems (Windows, Linux, MacOS), within this editor you create the operating system using the C programming language, the editor also has the ability to flash the operating system you have written to an Arduino board.
Although you write your own operating system for the Arduino, it is not as daunting as you may think, you are not creating a graphical interface to be displayed on a monitor for use with a keyboard and mouse. You will be creating an operating system with a single purpose, similar to the operating system that controls the different cycles on your washing machine. For example I recently created a maths quiz on an Arduino using a HD44780 16×4 character display and a series of buttons, a maths question was displayed on the screen and 3 possible answers were listed underneath, pressing one of the 3 buttons selected your desired answer, at the end of the quiz you were presented with your score.
- Single purpose design, this allows you to create a program that does one thing very well.
- Instant action, as soon as the Arduino is connected to a power source it will start doing the tasks it has been set to do.
- Lots of input and output pins allow great possibilities in real-world communication.
- Simple and easy to learn, although C can seem daunting at first there is lots of help on the Arduino website and many forums.
- No on-board connectivity, although wireless and Ethernet boards can be added on at extra cost.
- Although it’s a computer you won’t be able to use it as a computer, there is no VGA or HDMI options, you can’t install Linux or any main stream operating system.
- Lots of versions to choose from, this can make choosing a starting board complicated (I quite like the Mega 2560 as a starter board)
As you can see from the above, both machines are very different. I’m not saying that either is better than the other as they both have their uses, the Raspberry Pi can do things that an Arduino can’t, similarly the Arduino can do things that a Raspberry Pi could never do.
Hopefully the information provided above will help you choose a starting point into the weird and wonderful world of single board computers. If you have the available funds for both then go for it, with both machines the possibilities are endless!
The main thing to remember is that both boards are here to learn, have fun and create.
Leave a Reply