Adventures in Raspberry Pi. Carrie Anne Philbin
Чтение книги онлайн.
Читать онлайн книгу Adventures in Raspberry Pi - Carrie Anne Philbin страница 4
Reproduced by permission of Pimoroni
If you don’t want to spend cash on a case, why not create your own by using the Raspberry Pi Punnet? This template can be printed onto card stock, and then cut out and folded into a box. You can really let yourself get creative here and customise your case using pens, paints, stickers or coloured card stock to create a masterpiece. You can download the template from this site: http://squareitround.co.uk/Resources/Punnet_net_Mk1.pdf.
Want a sturdier case? Build one with Lego blocks! You can find instructions to build the Lego Raspberry Pi case shown in Figure 1-3 on the official Lego website at http://www.thedailybrick.co.uk/instructions/.
FIGURE 1-3 Build a Lego case for your Raspberry Pi.
Reproduced by permission of The Daily Brick
● A few spare SD cards– It’s worth having a few extra cards just in case the one you’re using becomes corrupted or stops working for any reason. They are also useful for backing up your files and projects – I explain how to do this at the end of the chapter.
● An SD card reader/writer– You’ll need an SD card reader/writer to enable you to put the Raspberry Pi operating system software onto an SD card. You download the operating system software onto your computer, plug the card reader into a USB port on your computer and use it to copy the OS onto an SD card that you can then load onto your Raspberry Pi. Many desktop computers and laptops are already fitted with an SD card reader and writer but if your computer or laptop doesn’t have one, you will have to get an external USB card reader.
● A Raspberry Pi camera module– The Raspberry Pi camera module is a Raspberry Pi camera board accessory for the Pi. It connects to the Pi with a flex cable and can be used to take digital images of whatever the camera is pointed at.
● A Wi-Pi– The Wi-Pi is a small wireless dongle designed to be connected to a USB port on the Raspberry Pi so that you can add your Raspberry Pi to a wireless network, perhaps to share an Internet connection or files with other computers on the network.
● A PiHub – As the Raspberry Pi has only two USB ports, you may find you run out of ports to plug in all your devices like a keyboard, mouse and WiFi dongle. The PiHub (http://shop.pimoroni.com/products/pihub) is a USB hub designed to work with the Raspberry Pi so that you can have access to more USB ports.
Getting your Raspberry Pi up and running takes just three main steps. First, you need to download the operating system software and copy it onto an SD card. Next, you hook up the hardware – the mouse, keyboard and other components. Finally, you install the software onto your Pi and configure a few settings. The next few sections walk you through this process for a smooth launch. Don’t worry: Doing the actual steps is much easier than reading these instructions!
For a video that walks you through the steps of setting up your Raspberry Pi, visit the companion website at www.wiley.com/go/adventuresinrp2E. Click the Videos tab and select the SettingUpRaspberryPi file.
All personal computing devices need an operating system (OS) to make them run. You’ve probably used a computer or laptop before, and the likelihood is that your computer’s operating system was Microsoft Windows for a PC, or Mac OS X for a Mac computer or Macbook. The Raspberry Pi can run a number of operating systems, but the OS most people use is Raspbian, which is a distribution of the free Linux operating system. The projects in this book assume you are using Raspbian on your Raspberry Pi, and the instructions in this section tell you how to download and install it.
More About Operating Systems
An operating system (OS) is a type of software that allows people to create, store and manage files and applications that contain information on a computer. Examples of popular operating systems include Microsoft Windows, Mac OS X and Linux.
Linux is a free, open source operating system. This means that the programming code it is made with is free and open for anyone to look at and possibly improve on. There are many versions, or distributions, of the Linux operating system available. Raspbian, the OS you use on the Raspberry Pi, is a Linux distribution. You may have heard of some other well-known Linux distributions, such as Ubuntu, Debian, or Fedora.
Raspbian was created by a community of thousands of volunteers world-wide. You
can connect to this community and learn more about Raspbian and Linux at www.raspbian.org.
A desktop or laptop computer uses a permanent storage device called a hard drive to store information and applications. The Raspberry Pi doesn’t have a hard drive, however, so your operating system, applications, and information all have to be stored on a removable SD card or micro SD card. This type of storage, known as flash memory, is the same as the kind you use with a digital camera to store all your photographs.
Before you plug in all the cables and so on, you first need to prepare (or flash) an SD card with the software the Raspberry Pi needs in order to run. This means that you format your SD card or micro SD card and copy the free Raspbian OS onto it. If you don’t do this step, your Raspberry Pi won’t recognise it as a storage device (like the hard drive of your computer) from which you can boot software. Don’t worry if these terms are unfamiliar to you – all will become clear as you read through this section.
The first thing a computer does when you turn it on is to start up, or boot, the operating system.
You can buy SD cards with the Raspbian software preloaded onto them. This type of card allows you to get up and running straight away and you can skip the instructions on how to install the Raspbian software. However, I recommend you walk through the installation steps in this chapter, rather than using a preloaded card. It’s useful to learn how to complete the formatting process yourself so that you understand how it’s done and can start fresh if anything goes wrong.
Your card must be formatted, as described in the following steps, before any software is loaded onto it.
1. The best way to ensure that the card is formatted correctly for use is to download, install and use SD Formatter 4.0 (www.sdcard.org/downloads/formatter_4) from the SD Association to your desktop or laptop computer. (The built-in Windows formatting tool will only format the first partition and not the entire disk, so it is important that you use the SD formatter 4.0 tool instead.)
2. To download SD Formatter, follow the link in Step 1, and select either SD Formatter 4.0 for Windows Download or SD Formatter 4.0 for MAC Download. Read