Raspberry Pi User Guide. Eben Upton
Чтение книги онлайн.
Читать онлайн книгу Raspberry Pi User Guide - Eben Upton страница 4
There are now hundreds of fan sites out there. For several years, there was a fan magazine called The MagPi, which was produced monthly by community members, with type-in listings, lots of articles, project guides, tutorials, and more. This became so successful that we brought it in-house at the Foundation, which makes it available in print or as a free download from www.raspberrypi.org/magpi. Type-in games in magazines and books provided an easy route into programming for me – my earliest programming experience with the BBC Micro was of modifying a type-in helicopter game to add enemies and pick-ups.
We blog something interesting about the device at www.raspberrypi.org at least once every day. Come and join in the conversation!
There were 100,000 people on our mailing list wanting a Raspberry Pi – and they all put an order in on day one! Not surprisingly, this brought up a few issues.
First off, there are the inevitable paper cuts you’re going to get boxing up 100,000 little computers and mailing them out – and the fact was that we had absolutely no money to hire people to do this for us. We didn’t have a warehouse – we had Jack’s garage. There was no way we could raise the money to build 100,000 units at once – we’d envisaged making them in batches of 2,000 every couple of weeks, which, with this level of interest, was going to take so long that the thing would be obsolete before we managed to fulfil all the orders. Clearly, manufacturing and distribution were something we were going to have to give up on and hand over to somebody else who already had the infrastructure and capital to do that, so we got in touch with element14 and RS Components, both UK microelectronics suppliers with worldwide businesses, and contracted with them to do the actual manufacture and distribution side of things worldwide so we could concentrate on development and the Raspberry Pi Foundation’s charitable goals.
Demand on the first day was still so large that RS and element14’s websites both crashed for most of the day – at one point in the day, element14 were getting seven orders a second, and for a couple of hours on February 29, Google showed more searches were made worldwide for “Raspberry Pi” than were made for “Lady Gaga”. We made and sold more than a million Raspberry Pis in the first year of business, making Raspberry Pi the fastest-growing computer company in the world, ever. Things aren’t slowing down: we make more than 300,000 Pis every month and have sold more than ten million in a little over four, with no hint of a slowdown. If we’d stuck with our original plans, we’d have made 100 or so of these devices for University open days, and that would have been it.
NOTE
The first production Pis were made in Chinese factories, but in 2012 we managed to repatriate all of the production to the UK. Your Raspberry Pi is now made in South Wales, in an area of the country with a proud manufacturing heritage, but few remaining factories. Amazingly, it costs us less to manufacture in Wales as it did in China, and we’re able to do that manufacture without a language or cultural barrier, and with the ability to jump in the car and be on the factory floor in a few hours if necessary.
There is nothing that affects the blood pressure quite like accidentally ending up running a large computer company!
So What Can You Do with the Raspberry Pi?
This book explores a number of things you can do with your Raspberry Pi, from controlling hardware with Python, to using it as a media centre, setting up camera projects, or building games in Scratch. The beauty of the Raspberry Pi is that it’s just a very tiny general-purpose computer (which may be a little slower than you’re used to for some desktop applications, but much better at some other stuff than a regular PC), so you can do anything you could do on a regular computer with it. In addition, the Raspberry Pi has powerful multimedia and 3D graphics capabilities, so it has the potential to be used as a games platform, and we very much hope to see more people starting to write games for it.
We think physical computing – building systems using sensors, motors, lights, and microcontrollers – is something that gets overlooked in favour of pure software projects in a lot of instances, and it’s a shame, because physical computing is massive fun. To the extent that there was any children’s computing movement when we began this project, it was a physical computing movement. The LOGO turtles that represented physical computing when we were kids are now fighting robots, quadcopters, or parent-sensing bedroom doors, and we love it. However, the lack of General Purpose Input/Output (GPIO) on home PCs is a real handicap for many people getting started with robotics projects. The Raspberry Pi exposes GPIO so you can get to work straight away.
I keep being surprised by ideas the community comes up with which wouldn’t have crossed my mind in a thousand years: the Australian school meteor-tracking project; the Boreatton Scouts in the UK and their robot, which is controlled via an electroencephalography headset (the world’s first robot controlled by Scouting brain waves); the family who are building a robot vacuum cleaner; Manuel, the talking Christmas moose. And I’m a real space cadet, so reading about the people sending Raspberry Pis into near-earth orbit on rockets and balloons gives me goosebumps.
In the first edition of this book, I said that success for us would be another 1,000 people every year taking up Computer Science at the university level in the UK. That would not only be beneficial for the country, the software and hardware industries, and the economy; but it would be even more beneficial for every one of those 1,000 people, who, I hope, discover that there’s a whole world of possibilities and a great deal of fun to be had out there. In the second edition and third editions, I was a little more ambitious, saying that we’d like to see that replicated throughout the developed world. As Raspberry Pi has grown, however, I’ve become even more ambitious: I want every child, everywhere, to have access to an open, programmable, general-purpose computer, and to have the opportunity to learn to program in the same way that I did on my BBC Microcomputer back in the 1980s. It’s a lofty goal, but we’ve already seen Raspberry Pi labs spring up in the most unlikely places, like a village lab in a part of Cameroon with no electricity network where the Pis run off solar power, generators, and batteries, or a school high in the mountains in Bhutan.
Building a robot when you’re a kid can take you to places you never imagined – I know because it happened to me!
Part I
The Board
Chapter 1
Meet the Raspberry Pi
YOUR RASPBERRY PI board is a miniature marvel, packing considerable computing power into a footprint no larger than a credit card. It’s capable of some amazing feats, but you need to know a few things before you plunge head first into the bramble patch.
TIP
If you’re eager to get started, skip to the next chapter to find out how to connect your Raspberry Pi to a display, keyboard, and mouse; install an operating system; and jump straight into using the Pi.
A Trip Around the Board
Since its launch as a mere two models, the Raspberry Pi family has expanded considerably. The current range consists of five mainstream models: the Raspberry Pi Model A+, Raspberry Pi Model B+, Raspberry Pi 2, Raspberry Pi 3 (see Figure 1-1), and Raspberry Pi Zero. Aside from the Zero, which is a cut-down model designed specifically for the lowest-possible cost and minimum board footprint, all models share a roughly similar design differing only in features such as the number of USB ports, presence or absence of network