Technology is making its way into everyday items at a dizzying pace. A great example is the NEST learning thermostat and how it changed the way we interact with our home heating and cooling. This connectivity between the thermostat and software allows for greater flexibility, ease of use and,in some cases, a savings on your heating and cooling bills. What allows this connectivity to happen is a small microcomputer or microcontroller that is breathing new life into previously untouched items. The cool part of it all? These microcomputers and microcontrollers are accessible to anyone who wants to tinker with hardware in new and exciting ways. The two we will be taking a deeper dive into are the Arduino and Raspberry Pi. So let's dig in and get you on the path of becoming a Maker.
The History of Arduino & Raspberry Pi
Both the Arduino & Raspberry Pi are at the very heart of the Maker movement. Let's get a quick background of both before we get technical.
The idea for Raspberry Pi was conceived by Eben Upton, Rob Mullins, Jack Lang and Alan Mycoff in 2006. Their goal was to build an affordable and accessible computer for kids to learn programming with. They had noticed a downward trend in the amount of children tinkering with electronics and programming due to the big, expensive nature of computers during that time. A couple years later, with the advent of smaller and more affordable components and mobile devices becoming "the norm", Eben, Rob, Jack and Alan teamed up with Pete Lomas and David Braben to form the Raspberry Pi Foundation. Three years later, they would release the Raspberry Pi Model B, which would go on to become a huge success. As it says on their about page:
We want to break the paradigm where without spending hundreds of pounds on a PC, families can't use the internet. We want owning a truly personal computer to be normal for children, and we're looking forward to what the future has in store.
Arduino was started as a project in 2005 for students at the Interaction Design Institute Ivera in Ivera, Italy. Previously using a "BASIC Stamp" that cost $100, they set out to make a microcontroller that would be a cost efficient alternative for their students. The name 'Arduino', funny enough, comes from a bar in Ivera where the founders would meet up. Their main goals for the Arduino were to make a microcontroller that was inexpensive, cross-platform so that any operating system (OS) could use it (yes, you too Linux), a simple yet powerful programming environment and an open-source ecosystem of software and hardware that allows anyone to extend and improve upon the Arduino. Today, you can find the Arduino behind many amazing robotics projects, 3D printers and other applications.
Let's Get Technical: Microcomputer vs Microcontroller
If you go ahead and do a google search on Microcomputer vs Microcontroller you'll get a ton of articles that would honestly scare the crap out of someone who's just getting into the Maker realm. So to make this as painless as possible, let's quickly go over the main differences between the two.
A microcomputer, in modern times, is literally an exceptionally small personal computer. Think the size of an altoids can. It can run an OS like Linux and you can connect a monitor and keyboard and begin messing around in the command-line with programming languages like Python and Scratch.
A microcontroller allows you to embed code onto it that you can use to control various Input / Output (I/O) functions. In laymens terms, an Input would be used to read some type of data from the outside world, which would then allow us to use that data for all types of fun! Some examples of input devices are a temperature sensor, touch screen or a keyboard. An Output is the inverse -- it allows us to control the outside world. The most famous of output examples would be blinking a LED light, the "hello, world!" of learning hardware. Other examples of output would be sending an image to a screen or playing audio. It doesn't have an OS so you are required to connect the device to your computer in order to write code for it. The advantage to this is that a microcontroller has a very low power consumption rate. This makes it great for interacting with real world items such as making a light flash. It can also accept a wide variety of external sensors, like motion and temperature sensors.
There are many functions that both a microcontroller and a microcomputer can both do. It is important though to recognize the slight differences that make one the right choice for the job. In practice, you can combine the two and make some pretty amazing projects together! Now let's dig in some more and look individually at the Arduino and Raspberry Pi.
Let's Get Technical: Arduino
We will use the Arduino Uno as the board we will be going over. The Uno has a total of 14 I/O pins, 6 of which support analong inputs. A "pin" is how we connect our sensors, lights or any other peripherals to the Arduino. Six of the pins can be used as Pulse Width Modulation or PWM outputs (which simply gets analog result through digital means), a USB connection and a power jack. The Uno can be powered through USB, an external power supply or a battery. You write code for the Uno through the Arduino IDE (Integration Development Environment) software that you download to your computer, which is available for Windows, Mac and Linux. It comes in at a tidy 2.95" x 2.1" and any color you want, as long as it is blue! Those are the major specs that most people should know about before jumping into things. If you'd like more details, you can check out the full listing of specs at the Arduino Uno's page.
Let's Get Technical: Raspberry Pi
The Raspberry Pi 2 Model B is the board we will go over, as it is the most common Raspberry Pi board used. Since the Raspberry Pi is a microcomputer, it has many of the components you would find on a PC. There is one major difference though that makes it more akin to a smartphone. The Raspberry Pi uses what is called a System on a Chip or SoC. With a traditional computer you would have seperate components like the CPU, GPU and RAM connected to a motherboard. While this gives you flexibilty to change out components and added power, you sacrifice space. With a SoC chip it packages up these components along with any other required components onto a very small chip that can fit into a compact device. The Raspberry Pi comes with a 900MHz quad-core ARM Cortex-A7 CPU which gives it as much power as a low to mid range smartphone. This power allows it to run any ARM Linux distrubition or even Windows 10. It has 4 USB ports as well as 40 General-purpose input / output pins (GPIO). It comes with a full HDMI port that allows you to connect to your monitor or TV, an ethernet port, 3.5 mm audio jack and an MicroSD card slot. To drive home the point, it really isn't that different from a regular PC, just a bit smaller. Speaking of smaller, it's dimensions come in at 3.37" x 2.125" which makes it a bit bigger than the Arduino but not by much. The big advantage to the Raspberry Pi is being able to run your choice of OS off a SD card. You don't need to connect it to your computer to write a script, you can just fire up the OS straight from the board and begin coding away! The one drawback to this is that it does use more power then the Arduino. For more detailed information be sure to check out the product page for the Raspberry Pi 2 Model B.
Enough Talking, More Building!
So now that we've gotten acquainted with the history and technical points of both devices, let's liven things up by looking at some of the cool projects that are possible. We'll break this up into two categories: A simple beginner project and an advanced project. We'll start off with the Arduino.
For Beginners (Arduino): Blinking a LED light
As stated earlier, the "hello, world!" of the Arduino is blinking a LED light. It is fairly straight forward and a great segway into other interesting projects. If you are like me, seeing anything blink grabs your attention! Here's a quick video on how to get started with this project:
Arduino: Lesson 1 - Blinking an LED
For Advanced Users (Arduino): Your Own Personal Portal Turret
If you've ever played the game Portal before, one of the more memorable items in the game are the turrets that track your every movement. For those that haven't played Portal, it has you solving puzzels using a handheld device that allows you to create human-sized portals to travel from one flat plane to another. A student from Penn State was able to replicate this turret using the Arduino Uno as the heart of the project. Pretty amazing what a little board the size of a playing card can do huh!
Real Tracking and Shooting Portal Turret
For Beginners (Raspberry Pi): Email notification w/ LED light
Similar to the Arduino's blinking light project but with a twist! You know how your phone blinks whenever you have a new notification? This video goes through how to make an LED illuminate red when you have no new emails, and green if something is new in your inbox.
Raspberry Pi - Beginner Tutorial of Adafruit Gmail LED Project!
For Adavnced Users (Raspberry Pi): Home Automation
A very popular project for Raspberry Pi users is to create a home automation system. There are many different implementations of this set-up, and this video goes through the beginning stages of this using Node.js.
Home Automation with the Raspberry Pi and Node.js - Well Tempered Hacker
We are just scratching the surface of the Maker movement. Everyday, innovative applications of these two small devices open up new avenues for improving everyday tasks. The best thing about this all? Both the Arduino and Raspberry Pi can be had for under $40. The Arduino Uno retails for around $25, while the Raspberry Pi right at $40. Both kits can be found through Adafruit and Sparkfun. If you can spare a little more cash, I would definitely look into one of the Inventor Kit's that both companies supply. The kits come with added peripherals along with step-by-step instructions for a variety of projects that you can tackle. The most popular kits are the Arduino Starter Pack from adafruit, the Raspberry Pi Starter Pack from adafruit and the Sparkfun Inventor's Kit. Remember, you are only limited by your creativity. So go out there and MAKE!