An Introduction To Raspberry Pi
We’ve come a long way from the time of Alan Turing and the room-sized computing machines that the Allies used to help break the Enigma code. Now you can pick up (in one hand no less) more processing power than was available for the Apollo mission to reach our moon.
Computers are powerful tools that are no longer only just available to nations and multinational corporations but also to regular people like you and me. While these electronic things have become commonplace, they’ve become smaller, faster and black-box-ier in recent years to the point of being inaccessible to even the most curious among us.
In early 2012, the Raspberry Pi Foundation released a $35 computer and the internet went wild (ok, a very small, mostly tech bloggy part). This was the Raspberry Pi 1, Model B. Originally only for the educational market in the U.K., it quickly became a must-have, DIY device around the world.
Was it the first, tiny single board computer? Far from it. Could you use it out of the box? Nope. For any of its shortcomings, the Raspberry Pi has thrived not only due to its affordability but also because of a global community of passionate teachers, tinkerers and professionals who’ve taken the time to support and share their knowledge–and love–for this little board.
In this article, I’ll discuss the Raspberry Pi basics so you can start your own DIY computing journey. What is the Raspberry Pi? An electronic tool that you can play with, so let’s get to playing.
Raspberry Pi Models
While the RasPi Foundation changed the embedded computing game with just a single initial offering, there are currently more than a few Raspberry Pi boards. You now have your pick when it comes to the latest Raspberry Pi models with just the right feature set to complete your project. Depending on the peripherals you want (HDMI, Audio, USB ports, etc.), there are Raspberry Pi versions at varying price ranges and board sizes for everyone. As of June 2017, here are the latest Raspberry Pi models:
Raspberry Pi 2 B
The first major upgrade to the model B line, the Raspberry Pi 2 is still a capable device, despite now being the “older model.” It lacks built-in wireless networking, which some might consider a security feature. This version introduced a standard, rectangular mounting hole pattern for easier case design and packs a quad-core processor for extra number crunching. Although it has since been superseded by the 3, you may find one on sale in a random corner of the internet, and it is still worth the buy.
Raspberry Pi A & A+
The Raspberry Pi A models are the middle ground of Pi offerings. If you want easier peripheral access (full size HDMI and USB ports) than a Zero but want reduced power consumption and bulk compared to the model B, then the As are the way to go. The processor may be slower and you’ll have less RAM, but it’s still a great platform for tinkering for around $20.
Raspberry Pi 3 B
The Raspberry Pi 3 B is the current belle of the ball and the latest mainline offering from the Foundation. It has WiFi, Bluetooth, 1 GB of RAM, a multicore processor and an 8-speed manual transmission! Wow…ok, so maybe not that last part, but the 3 is a rock-solid embedded computer and, at roughly the size of a pack of playing cards, is still a lot of features in a modest, $40 package. You can dive into the full specifications on Wikipedia.
Compared to any other model, the only possible downside is power consumption, but that is a minor gripe. If you’re getting started with the RasPi, buy this version first. Most projects now expect you’ll be using it, and it requires fewer adapters and needless dongles.
Raspberry Pi Zero
The Raspberry Pi Zero is the newest offering in the Pi line-up. It’s ultra-small (only 58 by 32mm), ultra cheap (MSRP $5) and maintains most of the I/O you’ll find in its bigger brethren. The Pi Zero requires soldering if you want to use the GPIO, and it lacks hardline ethernet. You’ll need to use a USB-OTG adapter if you want to plug in any USB peripherals. But if size is your biggest concern, then this model is hard to beat.
Many portable project people prefer the Zero due to its low power consumption and can manage with its lower processing specs. The latest offering (model “W” revision 1.3) includes bluetooth, WiFi and adds the CSI (camera) connector. If this sounds interesting, you can have a powerful DIY device at a modest increase in cost at only $10.
Raspberry Pi 4
Avast! Here be (speculative) dragons. Let’s put any Raspberry Pi 4 rumors to bed.
In an interview with Wired, founder Eben Upton speaks of the Pi 3 as “… more like a three year product. We may tweak some peripheral bits of it at some point but probably not even that.”
So don’t expect word of a Raspberry Pi 4 release date to grace your inbox anytime soon. The Pi 3 launched in 2016, so this would place any theoretical update into 2019. (Note: this is the distant future year depicted in Bladerunner!) I won’t make any claims to insider knowledge or mutant foresight abilities, but we can take a look at the facts and make reasonable projections as to the future offerings of the Raspberry Pi Foundation.
The Pi 3 already has great peripherals and modern connectivity. In keeping with the simple and affordable mantra, I could only assume they may add better power options in the form of LiPoly battery charging with a matching boost converter for the 5V electronics. Even then, something like this would likely only make sense for the Zero models. The mainline B boards are likely to stay as is, and that is a-okay. Of course, you should always stay tuned to the blog on the Raspberry Pi website for the latest news.
Raspberry Pi Projects
What can I do with Raspberry Pi? Whether you’re looking to make a robot, build an arcade or just blink a handful of LEDs, there are Raspberry Pi tutorials of nearly every design flavor. Raspberry Pi projects abound in every tech corner of the internet, so here are a few to wet your whistle:
Raspberry Pi Projects For Beginners
The Foundation is keen on making this a solid platform for learning. To that end, they’ve designed and documented more projects to help you get started than I can discuss, but do go check them out! They’ve also prepared dozens of separate tutorials on the most popular software, workflows and peripherals over on the Raspberry Pi website.
If you really want to get started building projects with Raspberry Pi and could happily allow someone else do all that design work, then there’s no better way to start than by building a few kits. Adafruit has invested a lot of time in creating great products that are also thoroughly documented. I highly recommend giving their RasPi offerings a try. You’ll find they’ve got Raspberry Pi Projects for beginners and pros alike.
So you’ve legally gathered dozens of your favorite movies, definitely purchased hundreds of TV shows, appropriately paid the big music labels for each and every song in your collection, and now you want to stream it/share it/bing it in every room of your house. How?
You could walk down the beaten path and just buy a box to do it for you, but that’s not why you’re reading this article, is it? Be bold! Make your own Raspberry Pi media center and say NO to off-the-shelf solutions:
XMBC: A.K.A. Kodi, XMBC is one of the most popular ways you can handle all of the media bits and bytes on the hard drive connected to your Pi. Here’s how to get set up over on MakeUseOf.
OSMC: Like Kodi, the Open Source Media Center does what it says and is another equally valid means for watching your remastered version of Waterworld on your big screen and streaming Katy Perry in every corner of your home.
Raspberry Pi Projects For Kids
Even taking a cursory glance at the Foundation’s website, and you’d be surprised if it wasn’t geared towards children. The Pi is meant as a learning tool, and I’d wager most kids, especially if they can already type, are more than capable tackling any of the beginner Pi projects they find interesting.
Even better, many great RasPi projects don’t require the use of the all-powerful, yet burning-hot soldering iron, so they’re quite safe to build. Either way, there’s no better way to find Raspberry Pi projects for kids than by reading about these Raspberry Pi projects by kids over on Tech Radar.
Advanced Raspberry Pi Projects
For those among you who live in snowy climes, you probably know the sheer joy of moving that white stuff around so you can leave your house. Kris Kortright shares your pain, so perhaps you’d like to recreate this remote control snow blower to aid in your wintery chores.
Wouldn’t it be better if your house could just adapt to your needs without the requirement for you to flip switches, or dare I say it, press a few buttons? Give your living quarters a bit more intelligence with these Raspberry Pi home automation projects:
J.A.R.V.I.S.: Jeremy’s Astute Residential Virtual Intelligent System is one of the most wildly advanced Raspberry projects, and it incorporates more features than you can shake a stick at. Seriously, just go check out this demo video for inspiration to build your own Iron Man-ish tech into your life.
Amazon Alexa: Your friendly synthetic assistant, from everybody’s favorite megacorp Amazon, doesn’t just come in commercial packaging like the Echo and Dot. Using the Pi (I’d recommend the 3 B) you can run the Alexa Voice Service in your own custom project. This definitely skews toward the software side, but having such a powerful speech recognition system for your DIY design is very attractive.
Raspberry Pi 3 Projects
Having difficulty finding out how to feed your cats when you’re away? Would you like to browse the internet with a greater sense of privacy? Are you fed up with having to steep your tea bags by hand, like some kind of animal? Find out how to solve all of these problems and more by reading about these Raspberry Pi 3 projects on the IT Pro website.
Raspberry Pi Zero Projects
Palmtop computers, handheld game consoles and even a tiny, functional arcade cabinet are among the Raspberry Pi Zero projects you can find over on Zdnet.
If the links above aren’t nearly enough to sate your endless need for DIY documentation, then head over to Hackaday.io where users have uploaded 900+ projects with the Pi.
Custom Raspberry Pi Case
Now that your latest robotic-media-center-arcade is complete, you’ll want to make a right proper custom box to keep it running for more than an afternoon. If you want to really show off the internal blinky goodness of your Raspberry Pi enclosure, consider making the entire case out of acrylic. Thanks to the availability of precise, high-powered CNC lasers, you can make a snug case that is engraved to your heart’s content too (just check out this sampling of Raspberry Pi laser cut cases).
Raspberry Pi Model A Case
Make designing a Raspberry Pi Model A case a cinch with this 3D model. It’s A+ work. (I’ll see myself out)
Raspberry Pi 3 B Case
3D printers are becoming more and more accessible and affordable for the average maker. Even if you don’t have personal access to one of these nifty machines, you may want to take a look at these 3D printed cases over on Thingiverse for inspiration.
Also, be sure check out this RasPi 3D model so you can make that perfect fit for your own design just like these models over on All3dp. And if you’re of the unconventional, renegade designer type, the folks at MakeUseOf have assembled a list of more ideas for custom Raspberry Pi cases using non-standard materials.
The official case is hard to beat in terms of a ready-to-go computer case.
PiBow: The Pimoroni peeps have you covered when it comes to Raspberry Pi 3 case solutions with a colorful twist.
Raspberry Pi Zero Case
Put down those calipers and grab this 3D model so that you can make a perfect Raspberry Pi Zero case.
Raspberry Pi Display Case
This display is one of the best official offerings from the Foundation, and I highly recommend it as your first Raspberry Pi screen. Be sure to enhance your projects using this accessory by 3D printing a Raspberry Pi display case for it, too.
PiTop: If you want the case for your Pi, look no further than the PiTop, which combines a screen, keyboard, power system, and more to turn your board into a decent laptop.
As you can see, finding or building a Raspberry Pi enclosure isn’t hard. For even more case-building goodness, check out this previous article I wrote about making custom electronics enclosures.
Raspberry Pi Programming
Is there a Raspberry Pi programming language? Nope! The RasPi may be lower-spec, but it is a fully fledged computer. This means you can run code from nearly any modern language!
Having previously only programmed microcontrollers, I was initially wary of creating hardware projects that required coding for a single board computer. After spending a single afternoon going through examples on the Foundation’s website, I had no concerns left. Programming with the Pi is a dream, and with so many great examples of well-written code out there, it’s no wonder this is the platform of choice for embedded computers.
Programming For The Raspberry Pi
While you can use nearly any language on the Pi, the de facto tongue of choice is Python. The best way to get started programming on the Pi is with IDLE 3, which is the official development environment for Python. Let’s take a look at a very simple Python program for blinking an LED.
0 from gpiozero import LED
1 from time import sleep
3 led = LED(17)
5 while True:
0 – Here, we’re saying, let us use just the LED portion of the gpiozero module. Modules in Python are more code that contain useful information like variables and functions that can be used over and over in your program. The gpiozero module has specific functions that simplify reading and writing to the pins on the Pi. It is more efficient to only load just the code you need, so we’re only using the LED parts of this module.
1 – In order to have human scale delays in our program, we need the ability to sleep, so let’s grab that from the time module.
3 – We need to create our own LED function, which we call “led,” and it will control pin 17.
5 – This is a while loop. Because we have it evaluating a “True” expression, it will run the code contained within the while statement forever.
6 – The LED function, among other things, allows us to turn the led on or off. This practically means that we’re sending a voltage across pin 17 of the Pi (which runs at 3.3 volt logic), which allows current to flow through the pin and the led will light up.
7 – Wait with the sleep function so that we can actually see the LED is on. We’re passing a value of one to the sleep function, so it will wait one actual second.
8+ – Here we’ll turn the led off and wait one more second. You may notice the program just stops here, but how does the interpreter know what to do with the code? Python separates blocks of code based on indentation, so the indented led and sleep functions calls are all part of the while loop.
Now we could call our program blink.py and run it by simpling typing “python blink.py” in the command line; it’s as simple as that! For a deeper tutorial to get you familiar with coding on the Pi, take a look at this full Python tutorial.
If you want to be even closer to the metal, then you may just want to jump into the official Raspberry repositories on GitHub, where you can find all of the low-level sources and gain access to the hardware in ways that mama Python just won’t let you.
Raspberry Pi Prototyping
There are a lot of reasons tinkerers and teachers begin Raspberry Pi prototyping, not the least of which is the availability of great products that make it fast and easy.
Raspberry Pi Prototyping Kit
For years, PCBs that fit or plugged into another larger board were simply called daughterboards. For whatever reason, the Arduino team called their add-ons “shields,” and the Pi Foundation found it fit to further rename their prototyping plates to “hats.” You can buy these Raspberry Pi prototyping boards that have plenty of space for additional components and allow you to build projects in no time at all.
The ever-helpful team at Adafruit has made a wonderful plate that plugs into any modern model B, which allows you to quickly screw in wires and solder (very small) circuits in a compact package. They’ve also developed dozens of other Pi-centric products so you can start your project asap with minimal fuss.
Compute Module: Once you’ve made the next bartending robot sensation with your Pi, you may want to commercialize it. While you could stuff a full board in your product, the Compute Module is the barest of bare bones Raspberry Pi boards. It is meant to be integrated into a product (it matches the PCB of DDR2 SODIMM RAM for mounting). However, since prototyping with the RPi Compute requires an expensive breakout board or your own custom PCB layout, I would only recommend it for engineering purposes. The other boards are far better for first-time tinkerers.
Raspberry Pi Alternatives
The Pi was neither the first, nor will be the last, single board computer for makers; it is simply the most popular. When it comes to the Raspberry Pi vs the world, well the world has some offerings that may better fit the bill for your idea:
Odroid: Hailing from Korea, the Odroid boards are generally more powerful than comparable Pi products and not too much more pricy. They’re almost dimensionally identical and a great choice when you want a little more processing punch in a small package.
C.H.I.P.: This offering from Next Thing Co. made quite a few headlines when it was released as the $9 computer on Kickstarter (before the Pi Zero was announced). This tiny, Linux-friendly board won’t have the same HD video chops as a PI, but it can easily run on a battery and is still one of the smallest, most affordable SBC options available.
Are you all about raw power? Do want to know how the Pi stacks up against the competing horde of SBCs? Take a look at this very thorough Raspberry Pi 3 benchmark to know once and for all.
Raspberry Pi vs Arduino
If you’re dabbling in the DIY electronic arts, then you’ve likely heard about the Arduino platform, too. Are you wondering which board is the right one for you?
Raspberry Pi vs Arduino is a false comparison, as they are both the right choice for your electronics projects. Let me put it this way: An Arduino is like a bicycle and a Raspberry Pi is like the average sedan. They’re both a means of transporting your stuff from A to B, but in very different scales.
Bike manufactures won’t ever add heated seats (but you could) and using a car to drive 10 kilometers is always going to be more expensive than a comparable bike ride. You should compare bikes to bikes and cars to cars.
Would you like your project to have an HD display? Use a Pi. Need it to start the second you turn on the power switch? Grab an Arduino. Want to program using nearly any language? Pi. Is battery life a big concern? Arduino. Simply put, use the Raspberry Pi as you would a full size computer that can talk to low level peripherals, and use the Arduino as a tiny gadget that can tackle a single high-level task.
Beaglebone Black vs Raspberry Pi 3
On its surface, the BBB seems comparable to the Pi in many ways: HDMI output, USB connectivity, ethernet, yada yada yada. When it comes down to the Beaglebone Black vs the Raspberry Pi 3, it’s a close race, but the Pi reigns supreme.
The BBB earns points for having built-in eMMC for your OS (an SD is mandatory for a Pi to work), and it has oodles more GPIO. But the Pi 3 B is simply cheaper, faster and easier to use thanks to a massive global community and the ongoing support of the Foundation. Beagleboard.org is good people, but when it comes to SBCs, I think the choice is clear.
That’s all for now folks. There are far more Raspberry Pi uses and projects than I’ve touched on here, so keep exploring. I’d be glad to hear if you gained some insight and inspiration for your own Pi projects. Stay tuned for even more baked-good related, yet inedible information!