Raspberry Pi Projects
eBook - ePub

Raspberry Pi Projects

Andrew Robinson, Mike Cook

Share book
  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

Raspberry Pi Projects

Andrew Robinson, Mike Cook

Book details
Book preview
Table of contents
Citations

About This Book

Learn to build software and hardware projects featuring the Raspberry Pi!

Congratulations on becoming a proud owner of a Raspberry Pi! Following primers on getting your Pi up and running and programming with Python, the authors walk you through 16 fun projects of increasing sophistication that let you develop your Raspberry Pi skills. Among other things you will:

  • Write simple programs, including a tic-tac-toe game
  • Re-create vintage games similar to Pong and Pac-Man
  • Construct a networked alarm system with door sensors and webcams
  • Build Pi-controlled gadgets including a slot car racetrack and a door lock
  • Create a reaction timer and an electronic harmonograph
  • Construct a Facebook-enabled Etch A Sketch-type gadget and a Twittering toy

Raspberry Pi Projects is an excellent way to dig deeper into the capabilities of the Pi and to have great fun while doing it.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Raspberry Pi Projects an online PDF/ePUB?
Yes, you can access Raspberry Pi Projects by Andrew Robinson, Mike Cook in PDF and/or ePUB format, as well as other popular books in Computer Science & Hardware. We have over one million books available in our catalogue for you to explore.

Information

Publisher
Wiley
Year
2014
ISBN
9781118555569
Edition
1

Part I
Getting Started with the Raspberry Pi

  • Chapter 1 Getting Your Raspberry Pi Up and Running
  • Chapter 2 Introductory Software Project: The Insult Generator

Chapter 1
Getting Your Raspberry Pi Up and Running

by Dr. Andrew Robinson
In This Chapter
  • What the operating system is for
  • How to put the operating system on an SD card for the Raspberry Pi
  • How to connect up your Raspberry Pi
  • A bit about the boot process
  • Basic troubleshooting if your Raspberry Pi doesn’t start
This chapter is a beginner’s guide to your first steps with the Raspberry Pi. It goes from getting it out of the box to getting something on the screen. Even if you already have your Raspberry Pi up and running, it’s worth a quick skim as you’ll discover how a 21-year-old student changed the world and a bit about how the operating system for your Raspberry Pi works. After this chapter, you’ll get into the real fun of creating projects!

The Operating System

The Raspberry Pi primarily uses Linux for its operating system (OS) rather than Microsoft Windows or OS X (for Apple). An operating system is a program that makes it easier for the end user to use the underlying hardware. For example, although the processor (the chip at the centre of the Raspberry Pi that does the work) can do only one thing at a time, the operating system gives the impression the computer is doing lots of things by rapidly switching between different tasks. Furthermore, the operating system controls the hardware and hides the complexity that allows the Raspberry Pi to talk to networks or SD cards.

Linux

Part of the success of the Raspberry Pi is thanks to the enthusiastic community that is behind it. Linux is a testament to what can be achieved with the support of volunteers around the world. In 1991, Linus Torvalds began work on an operating system as a hobby while he was a 21-year-old student at the University of Helsinki. A year later, his hobby operating system for desktop PCs (80386) was available online under the name Linux. Crucially, the code for the operating system was available as well. This allowed volunteers around the world to contribute; to check and correct bugs; to submit additional features; and to adapt and reuse other’s work for their own projects. If you master the projects in this book and learn more about computing, then who knows – one of your hobby projects could be as successful as Linus Torvalds’s is.
The popularity of Linux grew, and in addition to its use as a desktop operating system, it is now used for the majority of web servers, in Android devices and in the majority of the world’s supercomputers. Most importantly for us, it is used on the Raspberry Pi.

Linux Distributions

Because Linux code is publically available, different organisations have made slight changes to it and distributed it. This has led to different distributions (versions), including Red Hat, Fedora, Debian, Arch, Ubuntu and openSUSE. Some companies sell their distributions and provide paid-for support, whereas others are completely free. Raspbian is based on the Debian distribution with some customisations for the Raspberry Pi and is what is used in this book.
The most popular operating system for the Raspberry Pi is Linux. The widescale use of Linux (just think how many Raspberry Pis there are, not to mention Android phones, web servers, and so on) shows how much an idea can grow. After you start tinkering with the Raspberry Pi, one of your ideas might grow to be as big (or bigger) than Torvalds’s or those of the founders of the Raspberry Pi, and you too will make a real impact on the world. So let’s get started!

Getting the OS on an SD Card

The Raspberry Pi doesn’t know how to coordinate its hardware without an OS. When it is powered up, it looks on the SD card to start loading the OS. As such, you’re going to need an SD card with an OS on it.
You can either buy an SD card that already has an OS on it, or you can copy an OS to your own SD card with a PC. A premade card is simplest, but more expensive. Creating your own isn’t too difficult, but it is slightly more involved than just copying a file.

Premade Cards

Premade cards are bundled in kits or available to purchase from element14, RS or other online stores. A 4GB card sh...

Table of contents