
Today is March, 14, 2014, known to fans of Raspberry Pi and Pi Dayโ3.14. Get it? We love Raspberry Pi here at MAKE and the number of Pi fans is growing, but of course there are still lots of people who have no idea what we’re talking about. So, in honor of Pi Day, we’re running an excerpt from Matt Richardson and Shawn Wallace’s Getting Started with Raspberry Pi that breaks down what the Pi is and what all the fuss is about.
–Stett Holbrook, MAKE Senior Editor
Itโs easy to understand why people were skeptical of the Raspberry Pi when it was first announced. A credit card-sized computer for $35 seemed like a pipe dream. Which is why, when it started shipping, the Raspberry Pi created a frenzy of excitement.
Demand outstripped supply for months and the waitlists for these mini computers were very long. Besides the price, what is it about the Raspberry Pi that tests the patience of this hardware-hungry mass of people? Before we get into everything that makes the Raspberry Pi so great, letโs talk about its intended audience.
Eben Upton and his colleagues at the University of Cambridge noticed that todayโs students applying to study computer science donโt have the skills that they did in the 1990โฒs. They attribute this toโamong other factorsโthe “rise of the home PC and games console to replace the Amigas, BBC Micros, Spectrum ZX and Commodore 64 machines that people of an earlier generation learned to program on.” Since the computer has become important for every member of the household, it may also discourage younger members from tinkering around and possibly putting such a critical tool out of commission for the family. But recently mobile phone and tablet processors have become less expensive while getting more powerful, clearing the path for the Raspberry Piโs leap into the world of ultra-cheap-yet-serviceable computer boards. As the founder of Linux, Linus Torvalds, said in an interview with BBC News, Raspberry Pi makes it possible to “afford failure.”
One of the great things about the Raspberry Pi is that thereโs no single way to use it. Whether you just want to watch videos and surf the web, or you want to hack, learn, and make with the board, the Raspberry Pi is a flexible platform for fun, utility, and experimentation. Here are just a few of the different ways you can use a Raspberry Pi:
- General purpose computing
- Itโs important to remember that the Raspberry Pi is a computer and you can, in fact, use it as one. After you get it up and running, you can choose to have it boot into a graphical desktop environment with a web browser, which is a lot of what we use computers for these days. Going beyond the web, you can install a wide variety of free software, such as theย LibreOfficeย productivity suite for working with documents and spreadsheets when you donโt have an Internet connection.
- Learning to program
- Since the Raspberry Pi is meant as an educational tool to encourage kids to experiment with computers, it comes preloaded with interpreters and compilers for many different programming languages. For the beginner, thereโs Scratch, a graphical programming language from MIT. If youโre eager to jump into writing code, the Python programming language is a great way to get started. And youโre not limited to only Scratch and Python. You can write programs for your Raspberry Pi in many different programming languages like C, Ruby, Java, and Perl.
- Project platform
- The Raspberry Pi differentiates itself from a regular computer not only in its price and size, but also because of its ability to integrate with electronics projects. Weโll show you to how to use the Raspberry Pi to control LEDs and AC devices and youโll learn how to read the state of buttons and switches.
As makers, we have a lot of choices when it comes to platforms on which to build technology-based projects. Lately, microcontroller development boards like the Arduino have been a popular choice because theyโve become very easy to work with. Butย System on a Chipย platforms like the Raspberry Pi are a lot different than traditional microcontrollers in many ways. In fact, the Raspberry Pi has more in common with your computer than it does with an Arduino.
This is not to say that a Raspberry Pi is better than a traditional microcontroller; itโs just different. For instance, if you want to make a basic thermostat, youโre probably better off using an Arduino Uno or similar microcontroller for purposes of simplicity. But if you want to be able to remotely access the thermostat via the web to change its settings and download temperature log files, you should consider using the Raspberry Pi.
Choosing between one or the other will depend on your projectโs requirements and in fact, you donโt necessarily have to choose between the two. Weโll show you how to use the Raspberry Pi to program the Arduino and get them communicating with each other.
As you read this book, youโll gain a better understanding of the strengths of the Raspberry Pi and how it can become another useful tool in the makerโs toolbox.
But Waitโฆ Thereโs More!
Thereโs so much you can do with the Raspberry Pi, we couldnโt fit it all into one book. Here are several other ways you can use it:
- Media center
- Since the Raspberry Pi has both HDMI and composite video outputs, itโs easy to connect to televisions. It also has enough processing power to play full screen video in high definition. To leverage these capabilities, contributors to the free and open source media player,ย XBMC, have ported their project to the Raspberry Pi. XBMC can play many different media formats and its interface is designed with large buttons and text so that it can be easily controlled from the couch. XBMC makes the Raspberry Pi a fully customizable home entertainment center component.
- “Bare metal” computer hacking
- Most people who write computer programs write code that runs within an operating system, such as Windows, Mac OS, orโin the case of Raspberry PiโLinux. But what if you could write code that runs directly on the processor without the need for an operating system? You could even write your own operating system from scratch if you were so inclined. The University of Cambridgeโs Computer Laboratory has published aย free online courseย which walks you through the process of writing your own OS using assembly code.
Your typical computer is running an operating system, such as Windows, OS X, or Linux. Itโs what starts up when you turn your computer on and it provides your applications access to hardware functions of your computer. For instance, if youโre writing an application that accesses the Internet, you can use the operating systemโs functions to do so. You donโt need to understand and write code for every single type of Ethernet or WiFi hardware out there.
Like any other computer, the Raspberry Pi also uses an operating system and the “stock” OS is a flavor of Linux calledย Raspbian. Linux is a great match for Raspberry Pi because itโs free and open source. On one hand, it keeps the price of the platform low, and on the other, it makes it more hackable.
And youโre not limited to just Raspbian, as there are many different flavors, orย distributions, of Linux that you can load onto the Raspberry Pi. There are even several non-Linux OS options available out there. Throughout this book, weโll be using the standard Raspbian distribution thatโs available fromย Raspberry Piโs download page.
If youโre not familiar with Linux, donโt worry, we will equip you with the fundamentals youโll need to know to get around.
When you have access to an exciting new technology, it can be tough deciding what to do with it. If youโre not sure, thereโs no shortage of interesting and creative Raspberry Pi projects out there to get inspiration from. As editors for MAKE, weโve seen a lot of fantastic uses of the Raspberry Pi come our way and we want to share some of our favorites.
- Arcade Game Coffee Table
- Instructables user grahamgelding uploaded a step-by-step tutorial on how to make a coffee table that doubles as a classic arcade game emulator using the Raspberry Pi. To get the games running on the Pi, he used MAME (Multiple Arcade Machine Emulator), a free, open source software project which lets you run classic arcade games on modern computers. Within the table itself, he mounted a 24-inch LCD screen connected to the Raspiberry Pi via HDMI, classic arcade buttons, and a joystick connected to the Piโs GPIO pins to be used as inputs.
- RasPod
- Aneesh Dogra, a teenager in India, was one of the runners up in Raspberry Pi Foundationโs 2012 Summer Coding Contest. He created Raspod, a Raspberry Pi based web-controlled MP3 audio player. Built with Python and a web framework called Tornado, Raspod lets you remotely log into your Raspberry Pi to start and stop the music, change the volume, select songs, and make playlists. The music comes out of the Raspberry Piโs audio jack, so you can use it with a pair of computer speakers or you can connect it to a stereo system to enjoy the tunes.
- Raspberry Pi Supercomputer
- Many supercomputers are made of clusters of standard computers linked together and computational jobs are divided up among all the different processors. A group of computational engineers at the University of Southampton in the United Kingdom linked up 64 Raspberry Pis to create an inexpensive supercomputer. While itโs nowhere near the computational power of the top performing supercomputers of today, it demonstrates the principles behind engineering such systems. Best of all, the rack system used to hold all these Raspberry Pis was built with Lego bricks by the team leaderโs 6-year-old son.
If you do something interesting with your Raspberry Pi, weโd love to hear about it. You can submit your projects to the MAKE editorial team at editor@makezine.com.
ADVERTISEMENT