Adventures in Raspberry Pi. Carrie Anne Philbin
>
Carrie Anne Philbin
Adventures in Raspberry Pi, 2nd Edition
This edition first published 2015
© 2015 Carrie Anne Philbin
Registered office
John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, United Kingdom
For details of our global editorial offices, for customer services and for information about how to apply for permission to reuse the copyright material in this book please see our website at www.wiley.com.
The right of the author to be identified as the author of this work has been asserted in accordance with the Copyright, Designs and Patents Act 1988.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by the UK Copyright, Designs and Patents Act 1988, without the prior permission of the publisher.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.
Designations used by companies to distinguish their products are often claimed as trademarks. All brand names and product names used in this book are trade names, service marks, trademarks or registered trademarks of their respective owners. The publisher is not associated with any product or vendor mentioned in this book. This publication is designed to provide accurate and authoritative information in regard to the subject matter covered. It is sold on the understanding that the publisher is not engaged in rendering professional services. If professional advice or other expert assistance is required, the services of a competent professional should be sought.
Trademarks: Wiley and the Wiley logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/ or its affiliates in the United States and/or other countries, and may not be used without written permission. Raspberry Pi is a registered trademark of Raspberry Pi Foundation. All other trademarks are the property of their respective owners. John Wiley & Sons, Ltd. is not associated with any product or vendor mentioned in the book.
A catalogue record for this book is available from the British Library.
ISBN 978-1-119-04602-8 (paperback); ISBN 978-1-119-04605-9 (ePub); ISBN 978-1-119-04603-5 (ePDF)
Set in 10/12.5 Chaparral Pro Light by Indianapolis Composition Services
Printed in the United States at Command Web Missouri
For Mum & Dad – my best teachers.
Some of the people who helped bring this book to market include the following:
Series Creator: Carrie Anne Philbin
VP Consumer and Technology Publishing Director: Michelle Leete
Associate Director–Book Content Management: Martin Tribe
Professional Technology & Strategy Director: Barry Pruett
Acquisition Editor: Aaron Black
Development Editor: Sara Shlaer and Tom Dinse
Copy Editor: Grace Fairley
Technical Editor: David Whale
Associate Marketing Director: Louise Breinholt
Marketing Manager: Lorna Mein
Marketing Executive: Polly Thomas
Compositors: Jennifer Mayberry, Sarah Wright
Proofreader: Wordsmith Editorial
Indexer: Potomac Indexing, LLC
CARRIE ANNE PHILBIN is a high school-level Computing Google Certified Teacher and Raspberry Pi Certified Educator. She is also the founder and presenter of the award winning Gurl Geek Diaries (www.geekgurldiaries.co.uk) and vice chair of the #include Computing At Schools initiative (http://casinclude.org.uk) to get more girls and minority groups into computing. Currently, Carrie Anne works for the Raspberry Pi Foundation as ‘Education Pioneer’ to improve the teaching of Computing in schools.
I would like to express my deep gratitude to the Raspberry Pi Foundation for allowing me to set my creativity free on their marvellous invention. In particular I’d like to thank Alex Bradbury and Dr Sam Aaron for their enthusiastic encouragement and patient guidance. Their willingness to give their time so generously is very much appreciated. I would also like to thank David Whale and the Raspberry Pi Community for their useful critiques of this work. Thanks to Jennifer Mayberry for her design work and Sarah Wright for much of the art.
Special thanks should also be given to the staff of Pimoroni for providing necessary equipment in order to complete elements of this book, as well as members of CAS #include and the Rainham Library Book Club, for keeping my progress on schedule with their kind words of encouragement.
My special thanks are also extended to my good friends: Emma, Sian, Helen, Viv, Lizi and Kylie who are a constant source of inspiration in my life.
Finally, I wish to thank my parents, brother and sister-in-law for their patience, support and encouragement throughout.
Introduction
ARE YOU AN intrepid adventurer? Do you like to try new things and learn new skills? Would you like to be a pioneer in creating technology? Do you own a Raspberry Pi, or are you considering getting one? If the answer is a resounding “Yes!” then this is the book for you.
The Raspberry Pi is a computer. A very small computer. In fact, it is roughly the size of a credit card. Don’t be fooled by its size; as we know, good things come in small packages. However, the Raspberry Pi does not come in a package at all. It does not come in a case (although you can build one, as discussed in Adventure 1) and its circuit board and chips are fully visible, as you can see in Figure 1. You can plug a Raspberry Pi into a digital TV or monitor and use a USB keyboard and mouse with it, making it very easy to use, and because of its size you can easily transport it anywhere.
The Raspberry Pi gives you the opportunity to build and control a device that does what you want it to do. For example, you can deploy your very own robot arm, controlled by a program that you have written. You can design and create your own role-playing game, or produce beautiful computer art or music, all by using code.
FIGURE 1 The Raspberry Pi Model B and B+ boards.
Just because the Raspberry Pi is small doesn’t mean you can’t do big things with it. Here are just a few examples of some incredible Pi projects:
● Launching teddy bears into space using high altitude ballooning (www.raspberrypi.org/archives/4715)
● The ultimate bird feeder – it’s solar-powered, takes photographs and tweets images of birds! (www.raspberrypi.org/archives/4832)
● Crazy customised Halloween costumes like Doc Brown from Back to the Future (www.raspberrypi.org/archives/4856)
● A robotic sailboat (www.raspberrypi.org/archives/4109)
● Pi-controlled sculptures like the 15-foot tall Mens Amplio with a brain that lights up (