Difference between Raspberry Pi and Arduino

The first question people ask me these days when I talk about either Raspberry Pi or Arduino is what is the difference between them. This was one of the prominent question that people asked me during my recent PyCon talk and Maker Party presentation.

Even though both Raspberry Pi and Arduino are created to solve different problems, there is a slight overlap and people get confused on which one to choose for their projects.

Instead of answering people individually, I thought I would rather write a blog post so that I can point people to it when ever the question arises again.

Raspberry Pi

Raspberry Pi

Source: http://learn.adafruit.com/assets/2846

As most of you would know, Raspberry Pi is a full-fledged credit card sized computer with 512 MB RAM and 700 MHz micro processor. It can run a full Linux based operating system and has hardware support for SPI, I2C and Serial.

Pros

The following are some of the main advantages of Raspberry Pi

  • Entire Linux software stack is available
  • It is very easy to connect to internet
  • Can be programmed using variety of programming languages

Cons

The following are some of the main limitations of Raspberry Pi

  • Accessing hardware is not real-time. If the CPU is busy, then interfacing with hardware can be delayed
  • No built-in Analog to Digital converter available
  • Does not have enough power to drive inductive loads
  • The hardware design is not open source. Even though it is not a big deal, for some people it might a deal breaker

When to use (and not use) Raspberry Pi

If you project has very limited hardware interaction but is slightly complex on the software side or need to be connected to internet then you should just go with Raspberry Pi. Also if you want to program using variety of programming languages (not limited to C/C++), then you should choose Raspberry Pi.

On the other hand, if you project requires a lot of hardware interaction and need to read data from lot of sensors or need to control lot of devices, then Raspberry Pi may not be best choice.

Arduino

Arduino

Source: http://learn.adafruit.com/assets/3199

Arduino is a collection of three things. A hardware prototype platform, Arduino language and IDE & libraries. The board is based on 8-bit AVR microcontroller. It has built-in hardware support for SPI, I2C and Serial.

Pros

The following are some of the main advantages of Arduino.

  • Very easy to get started
  • Very easy to extend it and has tons of user contributed shields and libraries. Shields are available to do pretty much anything
  • Can be used to for real-time applications
  • Everything (both hardware, software and IDE) are open source
  • Not much programming knowledge needed to do basic stuff

Cons

The following are some of the main limitations of Arduino.

  • Not very powerful when compared with Raspberry Pi (Micro processor vs Micro controller)
  • You need to program using either Arduino or C/C++ (or assembly if you really want to)
  • Connecting to internet is slightly difficult (you have shields and libraries, but is not straight forward), but not impossible. I have in fact used Arduino with YQL and JSON parsing as well.

When to use (and not use) Arduino

If you project requires you to interact with lot of or complex external hardware, then you should consider using Arduino.

On the other hand, if your project requires lot you to write complex software or requires entire software stacks or protocols, then Arduino may not be the best options.

In Short

In short, this is the summary

Feature Raspberry Pi Arduino
Processor Speed 700 MHz 16 MHz
Programming Language No limit Arduno, C/C++
Real-time Hardware No real-time In real-time
Analog to Digital Convertor No Yes
Hardware Design Closed source Open source
Internet Connection Very easy Not easy, but doable

Best of both worlds

If you project requires both software and hardware equally, then you can also use both Arduino and Raspberry Pi together in your project and get the best of both worlds.

Arduino and Raspberry Pii

Source: http://learn.adafruit.com/assets/2846 and http://learn.adafruit.com/assets/3199

If you feel, I missed out any important points, then feel free to leave a comment below or ping me in Twitter and I will add them to the list.

10 thoughts on “Difference between Raspberry Pi and Arduino

  1. Pingback: A comprehensive comparison of embedded Linux boards - Hackalizer

  2. Howard

    One programming environment for the Arduino that you did not mention is Forth. There are a few different versions of Forth available, varying from free to around $1000 (SwiftX). For $25 you can get a very capable OS/compiler/interpreter/editor/debugger system that runs entirely on the Arduino itself, using your PC or Mac as just a terminal/downloader.

    Forth is an obscure language which requires a somewhat different mindset from either structured or OO languages, but is ideal for the very limited resources available in a system like the Arduino.

    Oh, I should mention that Forth the the most fun programming environment I have ever encountered.

    Reply
  3. John R. Mick

    I am just getting back into microprocessors after retiring 12 years ago. I spent 30 years in Silicon Valley during the microprocessor heyday – 8080, 8085, 8086, Z80, 68000, RISC processors, etc – designing hardware, writing software and defining new products.
    I am looking for a recommendation for a C/C++ compiler and also an assembler to use on a PC to write code for an UNO. I have been using the Arduino IDE but want to do some C/C++ and assembly programming.

    WOW – I was surprised to learn there is a FORTH programming environment for the Arduino. I did some FORTH programming on a Z80 machine in the early 1980’s (late 70’s??). I met Chuck Moore and Elizabeth Rather a few times. I had a lot of interface with Don Colburn back then. Several of us also ran MacFORTH that we got from Don. His company was Creative Solutions. Please recommend an UNO Forth environment and where to get it. Also, is it an interpreter or compiler.

    Thank you,
    John

    Reply
  4. Howard

    Unfortunately, I don’t really have a lot of time nor much motivation at this point to write any software for which I am not paid, so Forth is low on my list. When I retire from my present position (3-4 years), I plan to return to teaching young children how to play the violin, only full-time.

    I found some different Forth’s including AmForth, but that one is on SourceForge, which has become a cesspool of crapware and malware, and I avoid it like the plague it has become. Maybe somebody has it on a GitHub account?

    Forth, Inc, has a free evaluation version of SwiftX for Arduino. I generally like Forth, Inc., products, but I don’t pay for software tools. If somebody wants to hire me to write Forth and is willing to buy a copy of SwiftX for me to play with, I’d be all over that like a duck on a Junebug.

    Reply
  5. Howard

    @John Mick: I checked around, and found that SourceForge is the only place that has AmForth. I got a copy and examined it. Since it appears to be nothing but text and source with no Windoze installers, it appears that the low-lifes currently running SourceForge haven’t be able to load any crapware into it. At least not yet.

    What I probably should do now is create a GitHub account and upload the project there.

    Reply
  6. Adithya Krish

    I have two queries and please someone help me!
    ->Can we interface Triaxial accelerometer and Gyroscopes to a Raspberry Pi processor?If so, how?
    ->What is the difference between 26 pin RasPi and 40 Pin? i have a way to work my algorithm using 26 pin but I have a 40 pin RasPi.Will I be able to translate the code for 40 pin accordingly(I dont want to use an IDE extension cable!)

    Reply
    1. Adithya Krish

      I have a lot of queries and please someone help me!
      ->Can we interface Triaxial accelerometer and Gyroscopes to a Raspberry Pi processor?If so, how?
      ->What is the difference between 26 pin RasPi and 40 Pin? i have a way to work my algorithm using 26 pin but I have a 40 pin RasPi.Will I be able to translate the code for 40 pin accordingly(I dont want to use an IDE extension cable!

      Reply

Leave a Reply to Adithya Krish Cancel reply

Your email address will not be published. Required fields are marked *