Название | Adventures in Raspberry Pi |
---|---|
Автор произведения | Carrie Anne Philbin |
Жанр | Зарубежная образовательная литература |
Серия | |
Издательство | Зарубежная образовательная литература |
Год выпуска | 0 |
isbn | 9781119046059 |
● 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 and agree to the terms and your download will begin. Once the download is complete, extract the file by clicking on Extract All and then run the setup application following the onscreen steps.
3. With the SD Formatter installed on your computer, run the application. Make sure that it has the right drive selected for your card; for example it might be labeled D: or F: (see Figure 1-4).You can find out which drive is your SD card by looking in My Computer on a Windows computer or using Finder on Mac OS X.
The program will wipe all data from the card, so make sure you select the correct drive!
4. Click the Option button and select FULL (erase) from the drop-down menu. When you are ready, double-check that you have the correct drive selected, and click Format.
FIGURE 1-4 Formatting an SD Card using the SD Formatter application
With your SD card formatted, you’re ready to copy the Raspbian software onto it. The New Out Of Box Software (NOOBS) produced by the Raspberry Pi Foundation allows you to copy the files you need straight onto the SD card like you would do with photo or document files. It gives you the option of selecting which operating system you want to install, and even provides recovery should you accidentally delete all your software files.
If you are using a micro SD card, then you may need an adapter so that it fits an SD card reader slot. The official Raspberry Pi NOOBS card has a micro SD card inside it, so you can use it as an adapter.
All the projects in this book are designed to run using the Raspbian OS included in the NOOBS software. I recommend ensuring that you use the latest version of NOOBS before starting any projects in this book, otherwise you may have difficulty getting some of the projects to work.
First, you need to download NOOBS onto a desktop or laptop computer with an SD card reader. After you download the software, you will save it to an SD card for use with your Raspberry Pi. The following steps walk you through the process:
1. Navigate to the Raspberry Pi website at www.raspberrypi.org and click the Downloads tab at the top of the page. The New Out of Box