This is a simple process that lets you use the Pi for so many things including as a regular computer We’ll go over setting up the Pi as a computer and show you how to navigate the desktop and file sys tems We’ll show you how to use the terminal also known as the command line to give instructions to the Pi Finally we’ll introduce you to the Python programming language which is what we’ll be using to program the projects Once you’re done with this primer you’ll be ready to tackle the projects geTTINg sTArTeD WITh The rAspBerrY pI We’ll start by exploring uses for the Raspberry Pi board gathering what we need to get it running and loading an operating system onto a freshly formatted microSD card to put in the Pi board The Raspberry Pi is a credit card size microcomputer board that you can buy for about 35 It has everything a normal computer has a processor RAM ports to plug in a monitor mouse and keyboard and the ability to connect to the internet The Raspberry Pi board even has one special feature that normal computers don’t General Purpose Input Output Pins GPIOs These GPIOs let the Pi interact with the real world allowing you to build smart electronics projects and control them with the Pi You can use the Raspberry Pi to do most things you do with a regular computer such as browsing the web editing documents play ing games coding and much more Figure 0-1 shows a Raspberry Pi being used as a desktop computer Figure 0-1 Using the Raspberry Pi as a desktop computer 3 pRiMER
However keep in mind that the Pi isn’t as powerful as more expensive computers so it has some limitations First it can’t keep up with the demands of some modern software so not all software will work with the Pi Second it runs the Linux operating system instead of Windows or macOS which may be more familiar to you uses for the raspberry pi So what’s the advantage of the Raspberry Pi if it’s like a normal computer but with some limitations The Pi gives you freedom to experiment in ways you wouldn’t or couldn’t with your computer Computers are expensive and much harder to fix so you wouldn’t want to tinker too much without knowing exactly what you’re doing However as Linus Torvalds the founder of Linux said in an inter view with BBC News Raspberry Pi makes it possible to afford failure You can play around with hardware and software on the Pi without worrying about breaking something expensive or losing all your important files The Pi lets you experiment in two main ways creating your own programs The Pi comes with a set of free tools for writing software If you make a mistake you can just wipe your Pi and start over creating your own electronics projects The Pi board has GPIOs that allow you to connect sensors and other electronic devices that can interact with the real world You can create use ful things and have your projects running 24 7 without using much electricity There are endless uses for Raspberry Pi Here are some examples of projects people around the world have been making a retro gaming console to play old arcade games a supercomputer built by linking multiple Pi boards a cloud server to store and access your data a media center to organize and play media on your TV a home automa tion system to control and monitor devices in the house a whole host of awesome and useful robots like farming robots and autonomous robot cars just to mention a few For an example of a really cool Pi project check out the SeeMore sculpture shown in Figure 0-2 which displays the beauty of parallel algorithms by correlating the movements of a 256-node Raspberry Pi cluster 4 pRiMER
Figure 0-2 The SeeMore project Differentiating Between Boards There are several releases of the Raspberry Pi board as shown in Figure 0-3 R PI 1 M O D EL B R EV 1 R PI 1 M O D EL B R EV 2 R PI 1 M O D EL A R PI 1 M O D EL B R PI 1 M O D EL A R PI 2 M O D EL B R PI 3 M O D EL B R PI ZE R O W R PI ZE R O Figure 0-3 Chronology of Raspberry Pi boards FEB 2012 APR 2012 FEB 2013 JUL 2014 NOV 2014 FEB 2015 NOV 2015 FEB 2016 FEB 2017 Throughout this book we’ll be using the Raspberry Pi 3 Model B and that’s the board we recommend buying However if you already have an older Raspberry Pi model it should work with most of the projects in this book If you are using a model with 26 GPIOs instead of 40 you may need to change some of the project’s circuits which may require some research You can also consult the Raspberry Pi GPIO Pin Guide on page 261 for a pinout of older boards The Raspberry Pi boards differ in a number of aspects includ ing the number of GPIOs and the type and number of connectors Table 0-1 shows the different features of the Model B boards Note that the newer boards have better features such as more RAM and better processors You can also see that the Pi 3 is the first board to have built-in Bluetooth and Wi-Fi 5 pRiMER
taBle 0-1 Features of the Model B boards F e atu r e Processor RAM USB ports GPIOs Ethernet port HDMI Storage Wi-Fi Bluetooth Price Power source Pi1 ModelB 700 MHz single-core Pi1 ModelB 700 MHz single-core ARMv6 512MB ARMv6 512MB Pi2 ModelB 900 MHz quadcore ARMv7 Pi3 ModelB 1 2GHz quadcore ARMv8 1GB 1GB 2 26 SD 35 4 40 4 40 4 40 MicroSD MicroSD MicroSD 25 35 35 MicroUSB MicroUSB MicroUSB MicroUSB getting to know the raspberry pi and Its Accessories Let’s take a closer look at a Raspberry Pi board Figure 0-4 shows an annotated Raspberry Pi 3 Model B board Figure 0-4 The Raspberry Pi 3 Model B USB PORTS ETHERNET PORT GPIO PINS AUDIO JACK CSI CONNECTOR HDMI CONNECTOR PROCESSOR MICROUSB POWER INPUT ANTENNA DSI CONNECTOR MICROSD CARD SLOT 6 pRiMER