How to Make a Computer
A DIY for the aspiring hacker.
What I’m about to show you is, no joke, the most exciting thing to happen in computing since the 1970s. Earlier this year, a small team of engineers in the UK who wanted to get kids interested in computer programming, started making credit-card-size computers and selling them for $35 apiece (cheap enough that kids could buy them, and not be afraid of breaking them). They thought they would sell 10,000 in the first year. Seven months later, they’ve sold half a million. Their invention, the Raspberry Pi, is way more than a tiny computer—it’s the heart of a hacker movement.
If you were a teenager in 1976, a personal computer looked like this:
Apple I innards, photo by Geni, Wikimedia Commons
To make it do anything, you would need to add a keyboard, a power supply, a case, a TV, and tons of patience and know-how. Nowadays, computers are everywhere and everyone uses them, but nobody seems to wonder why or how they work.
Most electronics today are what are called “black boxes.” They are built to keep users out; the computer industry (dominated by Microsoft and Apple) doesn’t really want us opening up their machines and messing around with their insides. They would rather have us buy the newest, shiniest thing, rather than repair or modify old computer parts on our own. (The latest MacBook Pro, for example, might be the least hackable laptop ever made. They even use proprietary screws to make it almost impossible to get inside!) The big companies love compliant, unquestioning customers, and they treat us like children (with a lot of money). What they don’t like ishackers.
A common misconception is that hacking = accessing other people’s computers. (See: any movie or news story about “hacking.”) But the true meaning of hacking is much broader—it’s about problem-solving, rejecting limits set by outside forces, curiosity, and a true DIY spirit. In tech terms, it includes reverse engineering (taking stuff apart to learn how it works) and modifying electronics to suit your own needs and to answer your own questions. I like this video of Limor Fried (one of the most influential electrical engineers in the world) where she describes a hacker as “not somebody who breaks into something, but somebody who breaks out of something.”
The Raspberry Pi can transport us to those fun days of the 1970s when a computer was just a circuit board and a central processing unit, and the rest was up to you. But unlike in the ’70s, when these assembly-required computers cost hundreds if not thousands of dollars, the Raspberry Pi costs only 35 bucks. I got mine this summer, and I’ve had a lot of time to tinker with it, so I put together this DIY to get you started on hacking.
But before I get into the technical how-to, I want to share some of the really cool stuff you can do with your soon-to-be computer. Of course you can do all the normal things that you’re accustomed to doing on your Mac or PC, like watch The X-Files and write your novel. But with a Raspberry Pi, you can do so much more. You can use it as a robot brain, or a spy gadget. You can even put it in a balloon and send it into space. It can pretty much do whatever you design it to do, which is exactly what makes it so special.
On left, Raspberry Pi enthusiasts Anthony Stirk and Dave Akerman getting ready to send their computers into space. On right, a photo taken by the Raspberry Pi from near space. Photos by Dave Akerman.
So let’s get hacking.
I know that at first, looking at these instructions might make you want to run for your life. But don’t panic! I assure you that you can do this. Don’t worry about the technical language—those are just names of parts you’ll gather and use to make your computer. And once it’s done, you’ll be one step closer to doing things like sending your Pi to space, or making this amazing magic wand.
What everything looks like.
Required parts:
Raspberry Pi, Model B: $35. I got mine from this site, which ships all over the world. You can also buy one for slightly more at Limor Fried’s website.
A micro-USB power supply: Under $10. If you have a generic (non-Apple) phone charger, that will do.
A composite video cable (CVC): You probably already have one with the yellow, red, and white plugs—just use the yellow part. If not, you can get a CVC for pennies. (If you have a newer TV or computer monitor you might need an HDMI cable instead. These are in the $5 range.)
A USB keyboard and mouse: These are the kind that attach to your computer with a USB cable, not the keyboard and trackpad on your laptop. You might already have these; if not they’re about $15 each.
An SD Card: 2GB minimum size, 8GB recommended; $6.50. This is a memory card that you’ll need to start your homemade computer.
An SD card reader/writer: $1.20.
An ethernet cable: You probably have one of these—they’re the cables whose ends look like old phone jacks. If not, you probably have$1.75.
A TV set: If you don’t own one, you can get one for $10 at a thrift store. Or you can use a computer monitor instead.
Access to another computer and the internet.
Optional parts:
A case: I got this one at Adafruit for $20. You can also make your own.
A wireless USB adaptor: This tiny part will add Wi-Fi access to the Pi, eliminating the need for the ethernet cable.
A powered USB hub: The Raspberry Pi has only two USB ports for connecting peripherals like printers, scanners, storage drives, and cameras, but you can add on many more with a hub.
All kinds of other circuit boards, microcontrollers, wires, battery packs, LEDs, etc.: These are great if you are into using your Raspberry Pi to control lights, sensors, buttons, and even robots.
Putting it all together:
Steps 1-6, illustrated.
1. Take the SD card and the card reader and plug them into a computer with an internet connection. Then, download and copy an operating system (OS) to the SD card. I suggest you start with Raspbian Wheezy, available here. If you are using a Mac, follow these instructions for putting the OS on the SD card. If you are on Windows, follow these instructions. And if those instructions really freak you out, you can cheat and buy an SD Card with the OS pre-loaded from eBay.
2. Insert the SD card into the slot on the bottom of the Pi.
3. Plug one end of the ethernet cord into your Pi, as shown above, and the other one into your modem or router (whatever you use to connect to the internet), to get internet access on your Pi.
4. Plug in your mouse and keyboard.
5. Plug your video cable into the Pi, and then into the TV or monitor.
6. Plug in your power cord, first to the wall, and then to the Raspberry Pi.
The Pi has no on/off button. If everything is set up right, you should be seeing a solid red light labeled PWR, and a flashing green light labeled OK. On the first boot, it might take a minute for anything to appear on the TV/monitor. The first thing you will see is something like this:
This is the kernel (the bridge between the computer’s hardware and its interface) booting, and the computer reporting to you exactly what it’s doing. Eventually it will stop and ask you to log in.
7. When asked for a username, type “pi” and hit enter. Then you’ll be asked for a password; type “raspberry” and hit enter again. Type the password carefully; it won’t display on screen. But if you get it wrong, the computer will let you try again. (You can change your username and password later.)
8. You will now see a configuration menu. This is where you set up your Raspberry Pi to recognize your keyboard, display the correct time, etc. Use the tab and arrow keys to move around, and the enter key to pick options. A couple things that might not be self-explanatory: There is an option to “expand root partition to fill SD card.” You definitely want to enable this—it will allow you to save more software and files onto your SD card. There’s another option to “start desktop on boot.” If you want your Raspberry Pi to look like a Windows or Mac startup screen (otherwise known as the graphical user interface, or GUI) when you boot it, enable this one too. If you are using a TV (especially an older one) instead of a monitor with your Pi, enable the option called “change overscan” (if you’re using a computer monitor, you’ll probably want to disable this to fill the whole screen). (If you need more help, there’ s a good configuration guide over at the elinuxRaspberry Pi forums.
9. If you are still in the command-line interface (where it looks like lots of lines of text on the screen, as in the picture above), type “startx” and press enter to launch the GUI.
And, that’s it. Welcome to your new computer! At first, the system might feel a little strange to you. That’s because you’re in Linux, an operating system that you might not have seen before, but which is pretty simple to get the hang of. The Raspberry Pi can run a variety of Linux distributions, but the one I recommend, Raspbian Wheezy, is the best/easiest one to start with. The great thing about Linux is that basically all the software made for it is free, and open-source, which means everyone has access to the code, so anyone can mess around with how it works.
So, let’s say you want a free alternative to Microsoft Word on your Raspberry Pi. You just open up the terminal and type:
sudo apt-get update [enter]
sudo apt-get install libreoffice-writer [enter]
and the machine will download the source code from the internet and enable it to run on your computer. There are Linux alternatives to most software you can buy for Windows/Mac. Here is a short list:
Photo editing (e.g., Adobe Photoshop): GIMP (sudo apt-get install gimp)
Fast web browsing (e.g., Google Chrome): Chromium (sudo apt-get install chromium-browser)
PDF reader (e.g., Adobe Acrobat Reader): evince (sudo apt-get install evince)
Gaming emulator (e.g., MAME): Instructions here.
So now you’ve done it! Or at least you’ve bothered to scroll to the bottom of this page. Either way, it means you’re pretty awesome. And there are tons of awesome people like you out there in the Raspberry Pi community. There’s a fanzine, an official forum, and in-person meet-ups. You can also add yourself to this world map of Raspberry Pi owners and look for friends locally that way.
Even if you’re not super interested in making your own computer, you can still apply the hacking philosophy to your everyday life. So many things are presented to us as black boxes that are the way they are, and we’re not supposed to question why they are that way, or to poke around and see if they might work better with a few adjustments. We’re not invited to mess with the status quo. But as hackers, it’s our responsibility to examine, tinker, and improve. That doesn’t just go for computers; it goes for everything.
No comments:
Post a Comment