McManus Sean

Raspberry Pi For Dummies


Скачать книгу

things like browsing the Internet, writing letters, or copying files.

      ❯❯ The Raspberry Pi is not your only computer. At times, you’ll need to have access to another computer – for example, to create your SD or microSD card for the Pi. (See Chapter 2.) When it comes to networking, we assume you already have a router set up with an Internet connection and a spare port that you can plug the Raspberry Pi into.

      ❯❯ The Raspberry Pi is your first Linux-based computer. If you’re a Linux ninja, this book still gives you a solid reference on the Raspberry Pi and the version of Linux it uses, but no prior Linux knowledge is required.

      ❯❯ You share our excitement. The Raspberry Pi can open up a world of possibilities to you!

      Other than these assumptions, we hope this book is approachable for everyone. The Raspberry Pi is being adopted in classrooms and youth groups, and this book is a useful resource for teachers and students. The Raspberry Pi is also finding its way into many homes, where people of all ages (from children to adults) are using it for education and entertainment.

      Icons Used in This Book

      If you’ve read other For Dummies books, you know that they use icons in the margin to call attention to particularly important or useful ideas in the text. In this book, we use four such icons:

      tip The Tip icon highlights expert shortcuts or simple ideas that can make life easier for you.

      technicalstuff Arguably, the whole book talks about technical stuff, but this icon highlights something that’s particularly technical. We’ve tried to avoid unnecessary jargon and complexity, but some background information can give you a better understanding of what you’re doing, and sometimes we do need to get quite techy, given the sophistication of the projects you’re doing. Paragraphs highlighted with this icon might be worth rereading, to make sure you understand, or you might decide that you don’t need to know that much detail. It’s up to you!

      remember Although we’d like to think that reading this book is an unforgettable experience, we’ve highlighted some points that you might want to particularly commit to memory. They’re either important takeaways, or they’re fundamental to the project you’re working on.

      warning As you would do on the road, slow down when you see a Warning icon. It highlights an area where things could go wrong.

      Beyond the Book

      In addition to what you’re reading right now, this book comes with a free access-anywhere Cheat Sheet with tips on installing software and using Scratch. To get this Cheat Sheet, simply go to www.dummies.com and type Raspberry Pi Dummies Cheat Sheet in the Search box.

      Also be sure to check out this book’s companion website (www.dummies.com/extras/raspberrypi3e), where you can download the code listings that appear throughout this book, as well as two bonus appendices (one on The GPIO on the Raspberry Pi and one on the RISC OS) as well as a bonus chapter on Mathematica, a mathematical program.

      Both of us maintain our own personal websites too, which contain some additional information on the Raspberry Pi. Mike’s is at www.thebox.myzen.co.uk/Raspberry/Punnet.html, and Sean’s is at www.sean.co.uk.

      Where to Go from Here

      It’s up to you how you read this book. It’s been organized to take you on a journey from acquiring and setting up your Raspberry Pi to learning the software that comes with it, and from writing your own programs to finally creating your own electronics projects. Some chapters build on knowledge gained in earlier chapters, especially the sections on Scratch and Python – and all of Part 5.

      We understand, though, that some projects or topics might interest you more than others, and you might need help in some areas right now. When a chapter assumes knowledge from elsewhere, we include cross-references to help you quickly find what you might have missed. We also include some signposts to future chapters, so you can skip ahead to a later chapter if it provides the quickest answer for you.

      If you haven’t set up your Pi yet, start with Part 1. If you have your Pi up and running, Part 2 shows you how to use the software on it. Part 3 covers productivity, creativity, and entertainment software. To flex your programming muscles, perhaps for the first time, read Part 4. You can learn Scratch, Python, or Sonic Pi here, and feel free to start with any one of those languages. The Python chapters provide a good foundation for Part 5, where you can start building your own electronics projects.

Part 1

      Setting Up Your Raspberry Pi

      IN THIS PART …

      Get to know the Raspberry Pi and what other equipment you will need to be able to use it.

      Download the Linux operating system and prepare an SD or MicroSD card for use on your Raspberry Pi.

      Connect your Raspberry Pi to the power, USB hub, keyboard, mouse, and screen.

      Install and test the Raspberry Pi Camera Module.

      Change the settings on your Raspberry Pi.

Chapter 1

      Introducing the Raspberry Pi

      IN THIS CHAPTER

      ❯❯ Getting up close and personal with the Raspberry Pi

      ❯❯ Taking stock of your Raspberry Pi

      ❯❯ Determining its limitations

      ❯❯ Purchasing your very own Raspberry Pi

      ❯❯ Figuring out what else you need

      The Raspberry Pi is perhaps the most inspiring computer available today. Although most of the computing devices being used (including phones, tablets, and game consoles) are designed to stop people from tinkering with them, the Raspberry Pi is exactly the opposite. From the moment you see its shiny green circuit board, it invites you to prod it, play with it, and create with it. It comes with the tools you need to start creating your own software (or programming), and you can connect your own electronic inventions to it. It’s cheap enough that if you break it, it won’t break the bank, so you can experiment with confidence.

      Lots of people are fired up about its potential, and they’re discovering exciting new ways to use it. Dave Akerman (www.daveakerman.com) and friends attached one to a weather balloon and sent it nearly 40 kilometers high to take pictures of the Earth from near space using a webcam. (You can read about Dave’s ballooning project in Chapter 20.)

Professor Simon Cox and his team at the University of Southampton connected 64 Raspberry Pi boards to build an experimental supercomputer, held together by Lego bricks. In the supercomputer (see Figure 1-1), the Raspberry Pis work together to solve a single problem. The project has been able to cut the cost of a supercomputer from millions of dollars to thousands or even hundreds of dollars, making supercomputing much more accessible to schools and students. Others have also experimented with combining the processing power of multiple Pis. There's even an off-the-shelf kit you can use to combine four Raspberry