1
CHAPTER 1
Introducing the Raspberry Pi
So you’ve got yourself a Raspberry Pi mini computer. Now what? Perhaps you’re familiar with the Pi and its
architecture, but you’re wondering what to do with it. Perhaps you have some experience with computers but aren’t
familiar with Linux or Raspbian, the Pi’s default operating system. Perhaps you’re already a Linux geek, but you
don’t know how to program in Python and thought it would be a good time to learn. Perhaps you have absolutely no
experience with computers beyond clicking the Start button, checking your email, and surfing the web, but you heard
about this “Raspberry Pie” thingamabob and decided to see what all the ruckus was about.
Whatever the case may be, welcome! You’re about to join a club—not a particularly exclusive one, I’m afraid,
since all it takes to join is about $35 US plus shipping—but a club nonetheless. As a member, you’ll be able to discuss
package managers, ARM11 processors, and dot config files intelligently with anyone who will listen. You’ll know about
drivers and APIs. You’ll become familiar with servos, LEDs, and cameras-on-a-chip. And, perhaps most importantly,
you’ll be able to connect to your new mini computer, program it in one of many different programming languages
(though this book deals exclusively with Python), build projects, and interface those projects with the Pi, enabling it to
interact with the physical world and do some very cool things.
With this book, I hereby induct you into this club. Your experience doesn’t matter because I’ll take you step
by step through the process of setting up your Pi so that you can work with it with a minimum of headaches. I’ll try
to give you a solid background in Linux so that you understand what’s going on behind the scenes, and I’ll devote
a long chapter on introducing you to Python, the scripting language that all the fashionable geeks are scripting in.
Google uses it, NASA uses it, and the Book of Faces uses it. Let’s face it, Perl is so yesterday. I will also devote a chapter
introducing you to the nuts and bolts of building electronics projects—something many technical and programming
books either gloss over or neglect completely. There are safety factors to consider (I very nearly had a small explosion
when I shorted out a battery pack, for instance) as well as just good building practice. For example, you’ll learn how to
make a good solder joint and how to avoid slicing your index finger off with an X-ACTO knife, as well as the difference
between a 40W and a 40KW resistor.
Of course, if you’re already familiar with all those things, feel free to skip ahead to the good stuff: the projects.
All of them can be constructed in a weekend or so (or a month or two, depending on your motivation level and length
of your honey-do list), and all are programmed in Python. I’ll give you a shopping list of parts at the beginning of each
project, with places to get the parts, and then we’ll dive right in. They don’t necessarily build on each other, nor are
they in any particular order of complexity; if you want to build the Cat Entertainer and skip the Home Media Server,
it’s perfectly all right.
What kind of projects can you do with a Pi? You’d be surprised: the Pi’s small size belies its impressive computing
power. It has been used for everything from web servers to car computers (carputers) to cluster computing, when
hooked up in large groups. I hope that after you finish this book you’ll have not only some more ideas, but the skills
necessary to put those ideas into practice.
Whatever your reason for picking up this book, your main objective should be to have fun and learn something!
I’ll do what I can to lead the way.
评论0
最新资源