Contents
Guide
Page List
About the Author
Lorraine Underwood has a degree in Computer Science and is a trained secondary school teacher. She currently teaches undergraduate students at Lancaster University in the UK. Lorraine is also a maker, educator, resource creator, super mum, and all around awesome person. She specializes in making coding fun and accessible for everyone. Her favorite medium to work in is shiny lights. Lorraine blogs about her projects on her website http://lorraine.mcunderwood.org/.
Copyright 2020 by McGraw-Hill Education. All rights reserved. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher.
ISBN: 978-1-26-045760-5
MHID: 1-26-045760-5
The material in this eBook also appears in the print version of this title: ISBN: 978-1-26-045759-9, MHID: 1-26-045759-1.
eBook conversion by codeMantra
Version 1.0
All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the trademark. Where such designations appear in this book, they have been printed with initial caps.
McGraw-Hill Education eBooks are available at special quantity discounts to use as premiums and sales promotions or for use in corporate training programs. To contact a representative, please visit the Contact Us page at www.mhprofessional.com.
McGraw-Hill Education, the McGraw-Hill Education logo, TAB, and related trade dress are trademarks or registered trademarks of McGraw-Hill Education and/or its affiliates in the United States and other countries and may not be used without written permission. All other trademarks are the property of their respective owners. McGraw-Hill Education is not associated with any product or vendor mentioned in this book.
Information contained in this work has been obtained by McGraw-Hill Education from sources believed to be reliable. However, neither McGraw-Hill Education nor its authors guarantee the accuracy or completeness of any information published herein, and neither McGraw-Hill Education nor its authors shall be responsible for any errors, omissions, or damages arising out of use of this information. This work is published with the understanding that McGraw-Hill Education and its authors are supplying information but are not attempting to render engineering or other professional services. If such services are required, the assistance of an appropriate professional should be sought.
TERMS OF USE
This is a copyrighted work and McGraw-Hill Education and its licensors reserve all rights in and to the work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill Educations prior consent. You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with these terms.
THE WORK IS PROVIDED AS IS. McGRAW-HILL EDUCATION AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill Education and its licensors do not warrant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill Education nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hill Education has no responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill Education and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the possibility of such damages. This limitation of liability shall apply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise.
For the hubster, Phil,
my number one fan
Contents
PART ONE
Zombie Defense
PART TWO
Defend Your Home
PART THREE
Save the World
Preface
Welcome to my book. I wrote this book! Yes, me! My name is Lorraine, and I love coding. I think coding is the portal to everythingthe portal to having fun, being creative, being serious, and yes, saving the world. Superheroes of the future will not have superpowers or a cape; theyll have a laptop and great Wi-Fi.
Acknowledgments
I am so grateful to be given the opportunity to write this book by McGraw-Hill, and I would particularly like to thank Elizabeth Houde for all her help and guidance, and Patty Wallenburg for her amazing editing.
Im very lucky to live near a wonderful small school that my sons attend. The models in this book are all from my sons school and are (and will be!) in the Code Club, which I run every week. Thanks to Indie, Olive, Rose, Ffion, Catherine, Jasper, and Bailey for patiently posing for my photos and for their endless smiles and giggles.
Thanks to my reviewers: Michael, Rachel, Hannah, Lynne, Phil, James, Carolyn, Liam, Angie, and Nicole.
Thanks to my sons, David and SamDavid for being a model in this book, testing out the code in the missions, and being more excited about this book than me and Sam for also being a model in this book, doing his best to help out, and constantly asking me when the book was ready.
Thanks to my Twitter friends, Laurence, Darren, and Paul, for their endless enthusiasm and inspiration. To Helen Leigh, for blazing the trail with her book The Crafty Kids Guide to DIY Electronics: 20 Fun Projects for Makers, Crafters, and Everyone in Between (McGraw-Hill Education TAB, 2018). To my lifelong friend Katie for keeping me going over long distance and my number two fan Rachel, who always knows just what to say.
INTRODUCTION
Getting Started
With this book, you can code missions to help save the world using the BBC micro:bit, the Circuit Playground Express, and/or the Raspberry Pi. At the end of this Introduction, you will find a list of missions by device, difficulty, and whether you need extra equipment.
NOTE TO PARENTS/GUARDIANS
The Raspberry Pi is more suitable for older children or those with a lot of help from an adult, especially when setting it up. Many children will not have experienced Linux before, and the environment will not be familiar to them. The MakeCode platform for the BBC micro:bit and Circuit Playground Express is really easy to use. It is very similar to Scratch, which many children will have used before.