Chapter 1

Find Parts for Your Pi

The Raspberry Pi is a super-cool, super-small, super-cheap microcomputer. In fact, it’s a super-cool, super-small, super-cheap microcomputer board, and it doesn’t do much on its own. Before you can do super-clever things with it, you have to add some extras to build a Pi system.

image

Understand the Pi

The Raspberry Pi, shown in Figure 1-1, is a tiny computer developed in the UK by the Raspberry Pi Foundation (www.raspberrypi.org). It’s much smaller than a Mac or PC — it’s almost exactly the same size as a credit card! And it’s also much cheaper. (Prices vary, but a Pi costs around $30 in the United States and between £20 to £30 in the UK.)

warning The Pi only comes in Raspberry. There is no Apple Pi, Blueberry Pi, or Pumpkin Pi. A lot of people like Raspberry, so that’s fine with Pi fans.

Here are a few of the things you can do with a Pi:

  • Learn how computers work
  • Make and play games
  • Learn how to program
  • Make web pages
  • Make digital music
  • Build simple electronic projects
  • Design awesome Minecraft worlds
  • Have a ton of fun!

What you can’t do with a Pi

Although the Pi is a fully working computer, it’s not a Mac, a PC, a tablet, or a games console. It’s not as powerful as more expensive computers. Here are some things you can’t do with a Pi:

  • Run Microsoft Windows, or any Windows software
  • Download and play apps or games from the Apple App Store
  • Develop software for Windows, iOS, or OS X
  • Use popular web browsers like Chrome, Safari, IE, or Firefox
  • Play popular mainstream commercial games

Does that seem disappointing? It shouldn’t.

What you can do with a Pi that you can’t do with a bigger computer

To make up for it, you can do a lot of things with a Pi you can’t do with a bigger computer. For example, you can

  • Wipe your Pi in minutes and start from scratch if you make a bad mistake
  • Experiment with writing your own software
  • Build projects that do useful things and save money
  • Rewrite and customize all the software in your Pi
  • Make your Pi do something at certain times of day, or on dates you choose, or when a sensor notices a change
  • Connect thermometers, cameras, motion sensors, and other extras
  • Leave Pi projects running 24/7 without using a lot of electricity

You can see now why the Pi is special. Unlike a PC or a Mac, it’s so small and cheap you can buy a separate Pi for every project. You can leave it running all the time. And it comes with a good set of simple tools for writing software — all free.

Discover the Different Pi Models

Pi boards come in different types (see Table 1-1). You need to know about the differences so that you don’t buy the wrong one.

Table 1-1 Comparing Raspberry Pi Models

Model

What It’s Good For

A

Out of date now. Don’t buy one!

B

Out of date.

A+

Smaller, cheaper, slower than a Pi 2. Only useful for special projects.

B+

Out of date. Get a Pi 2!

Pi 2 Model B

You want this one.

The older models are called the A and B boards. The newer models are called the A+ and B+ boards. As of early 2015, there’s an even newer, faster, shinier, and better board called the Pi 2.

Figure 1-2 shows a Model B+ and a Model B.

The boards are the same size, and they use the same software. But they have different numbers of connectors and other bits and pieces.

tip I’ll make it easy to choose: You want a Pi 2. The older models are out of date now. You can still buy them, but the Pi 2 is much better for almost everything.

What’s the deal with the A+? It’s a cut-down budget Pi board with some important bits missing. It’s definitely not the Pi you want when you’re starting out.

It may, sometimes, kind of, perhaps be the right board for small finished projects. But don’t get one until you’ve read the rest of this book!

warning There is no Pi 2 Model A/A+ — at least, not yet. It’s possible the Pi people will start selling one by the end of 2015. Or maybe 2016. Or never. You’ll have to wait and see. If they do, it could be a cheaper option for finished projects. No one knows yet. And if it appears, your first Pi should still be a Pi 2 B, not an A.

Understand Pi Extras

When you buy a Raspberry Pi, you get a small circuit board. And that’s it. On its own, the board does nothing. You can’t do anything with it, except look at it, and maybe play catch, which is fun but not what it’s made for.

Collect Pi parts

To turn a Pi board into a working computer, you have to add some extras. Collecting all the extras and connecting them to the Pi is your first project. And it’s a big one!

Here’s a list of what you need:

  • USB hub with separate power (A and B models only)
  • USB keyboard
  • USB mouse
  • Monitor or TV
  • Memory card
  • Power supply
  • Long network cable
  • Cables and connectors

tip Try to do it yourself and ask for help from a grown-up only if you get stuck. You’ll learn a lot about getting started with computers. If you want to save time and maybe money, skip to the “Collect Parts the Lazy Way” section, later in this chapter.

Decide whether you need a hub

Are you getting a Pi 2? You don’t need a hub. Did you get an old Model A+ or B+ board? You don’t need a hub either.

Otherwise, there’s something you need to know: the original A/B models had a problem: If you plugged a keyboard and mouse into the USB connectors, the Pi often stopped working.

Figure 1-3 shows how you have to fix this issue by connecting everything to the Pi, including a keyboard, and mouse, through a USB hub.

tip The hub has to have its own separate power supply. The hub solves the problem, but leaves you with a big mess of wires and connectors and stuff.

The A+/B+/2 models work fine without a hub, as shown in Figure 1-4. This makes them easier to set up. They don’t need so many wires and cables.

technicalstuff A hub is a box with plenty of USB connectors. You plug one end into a single socket on the Pi, and then you plug all your other USB extras into the hub. If the hub has its own power supply, it makes sure that everything gets the power it needs.

tip If you plug things that use a lot of electricity to whirr or flash, like robot motors and killer lasers, you need a hub even on a Model A/+ and B+. Small things like keyboards and mice don’t need one.

Choose a mouse and keyboard

You can use any mouse or keyboard with a USB plug. Models with a cable should just work. You can probably use wireless models, as long as they come with a USB receiver dongle. (Anything made by Logitech should work.) Bluetooth mice and keyboards probably won’t work.

You don’t need to spend a lot of money on these extras. Basic models are fine.

tip You won’t be using your Pi for serious gaming, so you don’t need a Predator Ultra Galaxy Killer Destructo-Mouse with 15 buttons and a sharp and pointy design you can cut your fingers on. But if you have one spare, you can use it if you like. (The extra buttons won’t do anything.)

Choose a monitor or TV

The Pi can work with a monitor or a TV.

The best way to connect the Pi to a monitor is to use the HDMI socket. Most new TVs and many monitors have an HDMI socket that takes an HDMI cable. Hook up the cable to the Pi at one end and the monitor or TV at other, and you’re done.

Figure 1-5 shows where the HDMI connector is.

The monitor/TV doesn’t have to be very new, or very good. The Pi can barely produce HD video. Almost any monitor less than ten years old should work fine.

A few monitors have a different socket called a DVI-D connector. If you can’t find a monitor with HDMI, you need an adaptor cable with an HDMI plug at one end and a DVI plug at the other. Look on Amazon and eBay for a cheap one.

If your monitor has only a VGA connector, you need a special adaptor and a cable. Amazon and eBay should help again, but you may as well see whether you can find a used new or used monitor with the right connections. It may be cheaper than an adaptor.

warning The Big Yellow Socket on the Model A/B Pis can work with an old-fashioned analog TV — the kind that lives in a huge wooden box with a heavy thick glass screen. Most people don’t use them anymore. You shouldn’t either because the picture will be very fuzzy, and you won’t be able to read words on the screen.

technicalstuff You don’t really need a monitor at all because you can control a Pi remotely from another computer. This is called running headless — not because you can do it without your head, but because you don’t need a monitor, mouse, or keyboard. (These are just like the Pi’s head, kind of, if you use your imagination.) Setting up a headless Pi is kind of complicated, especially if you’re just starting out. It works differently on a Mac and a PC. If you’re curious, search the web for Headless Raspberry Pi. You probably won’t be able to get it working until you’ve spent more time with your Pi.

Recognize cables and connectors

Wait — USB? VGA? DVI? HDMI? What do all these letters mean? If you don’t already know, search the web to find out!

Type the letters into a browser search bar and see what you get. Search for images to see pictures.

You don’t need to know how the cables work. You don’t even need to remember that HDMI stands for High-Definition Multimedia Interface. (Like, really, who cares?)

But you do need to be able to tell cables apart so that you know which cable goes where on the Pi. You can also use the photos in this chapter as a guide. For example, Figure 1-6 shows the network/Ethernet and USB connectors on the side of a B+ board.

tip Letter lists like these are called TLAs — Three-Letter Acronyms. To make an acronym, you take the first letter of every word in a complicated technical name and put it in order. This makes a shorter word that is easier to remember (but not always easier to say). There are a lot of TLAs in computing. Some of them have four letters, which doesn’t make sense, but that’s just how it is. You don’t need to remember them all, but it helps to remember the ones that get used a lot.

Choose a memory card

The Pi doesn’t have a disk drive. It stores everything on a small memory card. The Model A or B needs an SDHC card with a speed rating of 8 or 10. For a Model A+/ B+/2, get a microSD card.

Figure 1-7 shows the bottom of a Model B+. The memory card is the black rectangle at the right.

The card should hold at least 4GB. You can get a bigger card if you like, but it will cost more, and most of the space will be wasted.

tip Some MicroSD cards come with an SDHC adaptor. If you get one of these you can use the same card in older A/B and newer A+/B+ Pi boards.

Find memory cards

The cheap option is to get a blank card — Amazon is a good choice — and write the software to the card by hand. You can only do this if your Mac or PC has a card reader/writer. If it doesn’t, you’ll have to buy one for about $5 to $10 (less than £10 in the UK).

The lazy option is to buy a card with the Pi software already installed. The software is called NOOBS. You can buy prewritten cards from Amazon and shops that specialize in Pi extras. The cards cost a few dollars or pounds more, but they save you some time.

Find a power supply

tip Although the Pi is cheap to run, it needs a special power supply and a special cable. The power connector on the Pi is a tiny microUSB socket, and it needs a matching plug. The socket grips the power cable hard so that you can’t pull it out by accident.

You can use a standard USB power supply as long as it’s 2A, 2.1A, or 2100mA. This means it produces plenty of spare power. If it isn’t labeled 2A, 2.1A, or 2100mA, your Pi may not work properly.

The best way to find a power supply is to look for Raspberry Pi Power Supply online. Don’t forget to look for the 2A tag!

tip Some cheaper supplies are labeled 1500mA or 1.5A. They’ll probably work, until you start plugging in lots of extras. It’s worth spending a little more and getting more power. Some Apple iPad adaptors produce 2.4A. That’s even better than 2.1A. If you have one, you can use one.

Other cables

You’ll probably need a network cable, which is sometimes called an Ethernet cable. The cable should be Cat 5 or Cat 6. Plug one end of the cable into your home Internet router and the other into the network socket on the Pi.

If you want to plug more than one Pi to a home network, buy a long cable and a network switch — a box with lots of network sockets. Plug the long cable into one of the sockets and other computers into the other sockets. The other end of the cable goes into your home router. (If this is too hard, ask a grown-up to help you. If you can’t find a grown-up to help, search the web!)

technicalstuff ‘Cat doesn’t mean meow here. It’s short for Category 5/6, which is a very boring description and means your cable is good and fast. Cat 4, 3, 2, 1 cables won’t work.

Add Optional Extras

You can add a lot of extras to your Pi. You don’t need them to get started, but they can give you more options and maybe make your Pi easier to use.

Choose a case

You don’t really need a case, but a good one will help protect your Pi from falling objects, fat fingers, and annoying brothers or sisters.

Search the web for Raspberry Pi case to see a very long list of cases. Pick one that looks good. They all do more or less the same thing. A/B, A+/B+, and Pi 2 cases are different, so make sure that you get the right one. Figure 1-8 shows a Pi inside a typical case.

tip If you live somewhere hot, get a case with air holes to help keep your Pi cool and ventilated.

If you don’t use a case, put your Pi on something that doesn’t conduct electricity. Thick paper, cardboard, wood, plastic, glass, and ceramics (plates and such) are all fine. Baking trays, metal foil, cutlery, silver plate, and gold bars are all bad because they can create a short circuit.

If you’re lucky, a short circuit will stop your Pi until you restart it. If you’re not, it will kill your Pi dead forever. (Although if you have gold bars to spare, you can always buy another Pi. Or ten.)

warning Pi boards don’t like static electricity. When you pick up a Pi board, hold it by the sides or by a USB or network socket. Don’t prod the electronics with your fingers. Don’t keep your Pi on the carpet or drag it over carpet. (Also, don’t put it in the microwave and turn the power on, dissolve it in acid, or feed it to sharks. But you knew that anyway, huh?)

tip If you don’t want to spend money on a case, you can print a case using cardboard! See www.raspberrypi.org/the-punnet-a-card-case-for-you-to-print-for-free.

Add WiFi (or not)

If you want to add WiFi, you have to plug a WiFi dongle — a small plastic stick with a USB plug at one end and WiFi electronics at the other — into a USB port.

tip There are many different dongles. Some are compatible with the Pi. Some aren’t. Some start working and then stop for no reason. Others don’t work at all. Some work almost all of the time but give you a very slow connection. This can drive you nuts. To stay happy, use a long Ethernet cable instead of WiFi.

Add a camera

A camera is a popular Pi extra. Most USB webcams work just fine with the Pi, but very old or very cheap webcams (less than $10) may not.

The official Pi Camera module is another option. It’s a tiny electronic board with an even tinier camera that works better than you expect it to. The Pi comes with ready-made software for the camera, so — unlike a webcam — you don’t have to write your own.

The camera is quite delicate, and if you use it a lot, you’ll want to put your Pi and the camera inside a special camera-friendly case. Search the web for Pi camera case for the latest options.

technicalstuff The official Pi Camera comes in two types: standard and noIR, which is short for no infrared filter. You can use the noIR camera to make spooky ghostcam photos and videos using invisible infrared light. Most people buy the standard model. If you want to make a wildlife camera or hunt ghosts, get the noIR version.

Add loudspeakers and headphones

The Pi has a standard audio jack socket, like the ones on many mobile phones and MP3 players. You can plug a pair of speakers or headphones into the socket. If the Pi makes some noise, you’ll hear it.

warning Because the Pi doesn’t have built-in Bluetooth, it won’t work with a Bluetooth speaker. It also doesn’t work with Apple or Android phone docks.

Collect Parts the Lazy Way

The smart way to buy a Pi system is to buy a Pi Starter Kit from a Pi shop. The right Pi kit will have everything you need, except a monitor/TV and (usually) a monitor cable. Search online for Raspberry Pi Starter Kit to find the latest deals.

Some Starter Kits include a Model B instead of a B+. Check this so that you know what you’re getting. Be careful to buy a Starter Kit, not an Electronics Kit; some shops sell kits of electronic parts for Pi projects. You may want one later, but you can’t start with one! Make sure that your kit includes a power supply, keyboard, mouse, memory card, and cables.

tip If you have a mouse and keyboard already, see whether you can find a kit with just a Pi, a memory card, and a power supply. Some stores sell them, and they’re cheaper than a full kit.

Check what you’ve got

If you don’t want to buy a kit, many families have an old computer parts box or shelf. It’s usually in the corner of an attic, garage, den, or spare room. To save money, raid the shelf and see what you find. You’ll often discover old mice and keyboards, cables, and perhaps even an old monitor.

If your family doesn’t have one, you can try asking uncles and aunts. Or you can get together with your friends to see what they’ve got!

Table 1-2 is a list of Pi parts. You can check off items as you find them or buy them.

Table 1-2 A Handy Pi System Checklist

Extra

Do I Need One?

Can I Find a Spare One?

Do I Need to Buy One?

Monitor or TV

Yes

USB Hub

Only for a Model A/B

2A USB Hub Power Supply

Only for a Model A/B

USB Keyboard

Yes

USB Mouse

Yes

2A Power Supply

Yes

SDHC Memory Card

Only for a Model A/B

Micro SDHC Memory Card

Only for a Model A+/B+/2

Card Reader/Writer

Only if your Mac/PC doesn’t have one already

Ethernet Cable

Yes

WiFi Dongle

Only if you can’t use an Ethernet cable

HDMI to HDMI cable

Depends on monitor/TV

HDMI to DVI cable

Depends on monitor/TV

Case

Nice to have

Camera

Nice to have

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.20.101