Ticker

6/recent/ticker-posts

Header Ads Widget

Arduino vs. Raspberry Pi - Which is best?

Today on bits we’re going to talk about the difference between the Arduino and a Raspberry Pi As you start on your next electronics project You may be looking for a brain to control it and you may be confused about whether you should use an Arduino or Raspberry Pi Right off the bat Let’s talk about the big difference between these two things so we know we’re talking about as we go through the specifics The Arduino is a microcontroller it generally has one set of instructions that it runs over and over and over in a loop as long as it’s powered on the Raspberry Pi is a full-on computer It runs an operating system typically Linux, but you can also run Windows It can be connected to a full monitor mouse keyboard. It can go on the Internet.

It’s an entirely different beast It may be overkill for some projects. But it also may be the perfect solution So between these two let’s talk about some of the differences first on the software side of things Like I mentioned the Arduino runs a single piece of code Over and over and over because of this it can start up very very quickly as soon as it’s powered on the Raspberry Pi Has to boot the entire operating system before it can start running any specific code But once it’s up and running you can run all sorts of applications.


You can check your email. You can run office documents or Specific code for an electronics project to write the code for an Arduino you’re gonna have to work on a different computer You’re gonna have to use something called an IDE and it’s a program that lets you write the code and compile it down to Instructions that the Arduino can understand once you get that written and compiled you’re gonna send it to the Arduino Over a USB cable those instructions get flashed directly onto the chip and can’t be changed Until you overwrite them with new code since the Raspberry Pi has a full file system You can actually write the code using an on-board tool if you want to and save it into multiple files.

That means that the PI could run one piece of code You could stop that run a different piece of code and so on another cool feature of the PI Is that the operating system and all of those files are actually saved on to an SD card? So for one Raspberry Pi you can have multiple cards with different operating systems and different file systems You can swap them in and out just by plugging and unplugging Getting the code to these devices is one thing but actually writing it is something else if you’re working on the Arduino You’re most likely going to be writing in a subset of the language C.

It’s a pretty narrow band You don’t have a whole lot of options and it’s made Specifically for the Arduino if you’re gonna be working on the Raspberry Pi you’ve got tons of different options You can write in many, many different languages Typically, it’s done in Python now Let’s jump over to comparing the hardware One of the big things you’re gonna think about is the i/o or the input output Of each one of these boards the Arduino Uno has 14 digital input or output pins and six that could be analog or digital in case you’re curious digital just means on or off analog means you have a whole spectrum of values that it can read the Raspberry Pi 3 has 40 I/o pins on board and the pins I’m talking about are literal pins that stick out of the board that you plug wires onto this Is how you can easily attach lights or sensors or motors or anything that you want to take input from?

Or give output to another thing to consider as far as input/output are the ports that are built on to the boards themselves Different types of Arduino boards will have different ports on them, but the uno really doesn’t have much available It’s got a USB port basically just for getting code onto it and nothing more But the Raspberry Pi has a lot of ports available to you. It’s got audio ports, HDMI, Ethernet, USB It’s got plugs for touchscreens and cameras.

It’s a full-on computer So it offers you a lot more the Raspberry Pi also has Bluetooth Low Energy and Wi-Fi built onto it the Arduino Uno does not But there are some other Arduino boards that provide those features But even if an Arduino doesn’t have all the features that you want There is a standard way to add features to it.

The Arduino uses something called shields and these are snap on boards that go right down on to the pins that add Functionality or ports the Raspberry Pi also has something similar to this but they’re called hats instead of shields where the last things to think About when you’re choosing one of these boards is a power consumption both the Arduino Uno and the Raspberry Pi 3 run on 5 volts But they do require a different current they recommend two amps for the Raspberry Pi one amp for the uno and some of the smaller Arduino boards only run on 500 milliamps So which one of these should you use it really depends on the specific needs of your project?

So as an example Let’s take an old project of mine and talk about why I used what I used a couple of years ago I made a full-sized arcade cabinet that used both a Raspberry Pi and an Arduino to do different tasks to be clear the PI could Have done all of it, but I wanted to separate those into different functions.

The Raspberry Pi was running a specific operating system made to handle the user interface the controls and the gameplay of the arcade But also wanted to add some functionality with motion sensors and lights separately I had the Arduino running a motion sensor and looking from movement that motion would trigger LED lights on the back of the cabinet to turn on and off and that by itself is a really great example of what you could use an Arduino for it’s looking for an input from a sensor and Controlling an output like a light.

So when it comes down to picking which one of these is going to work for your next project There’s a few things you might want to keep in mind One is the power consumption two is how many inputs or outputs you need to apply to it and what you’re actually asking the board To do if it’s a simple task.

There’s a pretty good chance that the Arduino can handle it But if you need more computing power, you’re probably going to want to look at a Raspberry Pi I hope this information was helpful and gives you the information You need to pick a board for your next project If you got some other details you want to throw in around these two boards.

Post a comment

0 Comments