$35 Computer: The Vast Possibilities of Raspberry Pi

The bare-bones Raspberry Pi comes with no keyboard, no monitor, and no operating system. But the Linux-based blank computing slate opens a world of coding possibilities—if you're patient. (Note: There's now an even simpler $25 Raspberry Pi, the Model A.)

By Rachel Z. Arndt

Philip Friedman

April 2, 2013 6:30 AM Text Size: A . A . A
The Raspberry Pi is about the most minimalist computer you can buy. Made of little more than a single circuit board, the $35 computer arrives with no case, keyboard, monitor, or mouse—and, most importantly, no operating system. But a blank slate can be a fun place to start with a computer, especially when, like the Pi, it runs on Linux, an open and collaborative operating system that is receptive to tons of coding tweaks. With a bit of noodling, and some computer leftovers from PCs long retired, you can turn the diminutive computer into anything from a streaming music player to a regular old word-processing, Internet-surfing desktop.

Making the Pi

The Raspberry Pi comes from England, where Eben Upton and fellow computer scientists at the University of Cambridge set out to improve kids' computer skills. The problem, they found, wasn't the curriculum but the computers themselves, which had become too advanced and too expensive to experiment with. Upton didn't want a computer programmed to work straight out of the box but, instead, a computer begging to be programmed.

The resulting code-friendly $35 computer is exactly that. Its 700-MHz ARM processor is slow, so the Pi won't be taking the place of your primary computer any time soon, but will add to your understanding of it, letting you try out code and build dedicated machines—music players or game consoles, for instance—that you'd never dare devote a single $1000 laptop to.

I found two Raspberry Pis to experiment with on eBay, since I couldn't get any through regular retail channels. The Raspberry Pi Foundation (RPF) licensed its technologies to two manufacturers, Premier Farnell/Element 14 and RS Components, but both companies are often low on stock. No matter where you buy, make sure to get the newest Model B, with 512 MB of RAM, and, if you can, a kit that comes with a power supply—though if you have a micro USB charger with at least 5 volts, you can use that instead. You also need a FAT32-formatted SD card with at least 4 GB, because the Pi has no hard drive. The other materials you likely already have: almost any mouse, screen with an HDMI input, and keyboard (PC models seem to work better than Apple keyboards). To get the Internet, which you'll need to do to install software and system updates, you can either plug the Pi directly into an Ethernet connection or use a USB Wi-Fi adapter, such as the $13 Edimax EW-7811Un.

Making the Pi a PC

To get the computer to actually do anything, you need an operating system. Like the RPF, I recommend starting with Raspbian "wheezy," a build of Linux based on Debian and made specifically for the Pi. You can find it on the RPF website, raspberrypi.org, where you'll also find step-by-step installation instructions. To get the OS onto the Pi, you first have to get it off your regular computer and onto a memory card. Because the OS isn't like a regular file, you can't just drag and drop it onto the card. The first step is downloading the OS. Then, on a PC, use Win 32 Disk Imager, also available from the RPF. On a Mac, you can either use commands in Terminal (see elinux.org's guide) or the RPI-sd card builder (also from elinux.org). Once the OS is on the SD card, insert it into the Pi and plug everything in to turn the device on. After responding to a few configuration options, you'll see white text on a black background that will take you back to the days of waiting for Windows 95 to boot up. Enter the graphic user interface by typing startx and hitting return, and what you'll find is LXDE, a user interface also reminiscent of old Windows. Before going too crazy with the preinstalled applications, head to Terminal to check for system updates. Because Raspbian is coded to let you operate without going into a root account—the user account that can change anything and everything about the computer—you'll need to preface many commands with sudo, the instruction that lets you operate as a superuser. To update the OS, type sudo apt-get update. When you enter the command, be patient; I worried at first when nothing showed up that the text didn't take. It wasn't futile—just slow. While you're there, you might want to install another Web browser. Raspbian includes Midori, but it can't run Flash; another browser called Iceweasel can. Download Iceweasel and the Flash plugin with this install command: sudo apt-get install iceweasel browser-plugin-gnash. Likewise, the preinstalled word processing and video work fine, but you can download alternatives. In December the RPF launched the Pi Store for software distribution. The current Raspbian build comes with an icon that launches the store, where you can find programs such as Barracuda, an online-storage system, and Despotify, a client that streams music for Spotify Premium users—albeit pretty slowly.

The Pi, in Practice

There's a huge online community of Raspberry Pi tinkerers offering code for projects from robots to routers. Here's a glimpse of some of the best projects out there.

Turn your Pi into a portable personal VPN for secure Internet browsing. Check out Lifehacker's guide or the instructions on elinux.org

The Raspberry Pi may one day replace Arduino as the choice platform for robots. Michael Mitchell used a Pi for his Google Talk bot, and the platform was also the brains of a two-wheeled robot on the University of Cambridge's Computer Laboratory site.

Make the Pi a dedicated music player by following Instructables' tutorial or Jordan Burgess's Airplay guide.

With SiriProxy installed, you can use Siri to tell the Pi to complete tasks, such as opening a garage door. The program is available for free here.

Aaron Hill won the 13-and-under division of Raspberry Pi Foundation's Summer Coding Contest with PySnap, a program that controls a USB-connected camera for time-lapse photography. Find it here.

Basic Linux Commands

In these commands, "foo" stands in for the variable (so, for instance, if the command is about deleting a certain file, that file will be called foo). To execute a command, type it in Terminal and hit return.

open GUI: startx
update OS: sudo apt-get update
get information about command: man foo
display contents of home/pi directory: ls -l /home/pi
go to documents in home/pi/Documents directory: cd /home/pi/Documents
enable root user: passwd root
execute command as root user: sudo foo
enter root session in Terminal: su
reboot: sudo reboot
force-quit program: killall foo
delete file: rm foo
update database for searching: sudo updatedb
search (not case-sensitive) for file: locate -i foo

Making the Pi a Media Center

Raspbian is ideal for getting familiar with working in command line, but a more realistic use of the Raspberry Pi is not as a makeshift desktop computer but as a media center. Check out Raspbmc, a relatively powerful media player OS that evolved from XBMC, a Linux-based system originally coded for the XBox. The comfortable, entertainment-focused interface gives you quick access to media files stored either on a network or on removable storage, as well as videos streamed via add-ons.

To copy Raspbmc onto your SD card on a PC, download a setup utility from raspbmc.com/download, which will walk you through the SD card transfer. On a Mac, open Terminal from an administrator account and enter curl -0 http://svn.stmlabs.com/svn/raspbmc/testing/installers/python/install.py and follow the installer instructions.

The OS loads automatically when you put the SD card into the Pi and, after restarting, will show you an iTunes Cover Flow–like viewer leading to downloadable add-ons, Internet TV (such as streaming sports channels that include MLB and NBA games), and any external media. One of the easiest and most useful functions of the system is movie playback—a great way to get video files onto a large TV screen. The Pi supports videos encoded in H.264, a format used by Blu-ray, Quicktime, and some .avi files; others are MPEG-2, for which you'll need to buy an MPEG-2 license from the Rasperry Pi site. You can either put files on a USB flash drive or stream them from a network. Regardless, navigate to Videos, where you choose the media source. (You can also play YouTube videos, but those are markedly slower and, I found, not really worth the trouble.)

Like Raspbian, Raspbmc is sluggish—which has everything to do with the Pi's lackluster processor. Luckily, in both of these OSs, you can manually instruct the computer to operate faster than it's set to by overclocking. Don't go overboard, though; if the computer is set to run too fast, it'll overheat. But if you're willing to experiment, head to the System Performance Profile in the settings of Raspbmc, where you can change the speed to Fast or Super. Doing the equivalent in Raspbian requires a single command in Terminal, sudo raspi-config, to bring up settings.

As with all things Pi, there's a ton of information on overclocking online. The Pi Web community is strong, and the foundation's recently released—and free—Raspberry Pi Education Manual is a great help. But if you do get frustrated, remind yourself, as I did many times, that for $35, you get a credit-card-size device with more room for experimentation than almost any other computer on the market—and more online support than most others too.

Post a comment

Featured Video