Contents in Detail
MICRO:BIT FOR MAD SCIENTISTS
30 CLEVER CODING AND ELECTRONICS PROJECTS FOR KIDS
BY SIMON MONK
San Francisco
MICRO:BIT FOR MAD SCIENTISTS. Copyright 2019 by Simon Monk.
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher.
ISBN-10: 1-59327-974-4
ISBN-13: 978-1-59327-974-5
Publisher: William Pollock
Production Editor: Janelle Ludowise
Cover Illustration: Josh Ellingson
Illustrator: Miran Lipovaa
Interior Design: Beth Middleworth
Developmental Editor: Liz Chadwick
Technical Reviewer: David Whale
Copyeditor: Paula Fleming
Compositor: Happenstance Type-O-Rama
Proofreader: Abby Franklin
For information on distribution, translations, or bulk sales, please contact No Starch Press, Inc. directly:
No Starch Press, Inc.
245 8th Street, San Francisco, CA 94103
phone: 1.415.863.9900;
www.nostarch.com
Library of Congress Cataloging-in-Publication Data
Names: Monk, Simon, author.
Title: Micro:bit for mad scientists : 30 clever coding and electronics projects for kids / Simon Monk.
Other titles: Microbit for mad scientists
Description: San Francisco : No Starch Press, Inc., [2019] | Includes index.
Identifiers: LCCN 2019015785 (print) | LCCN 2019021782 (ebook) | ISBN
9781593279752 (epub) | ISBN 1593279752 (epub) | ISBN 9781593279745 (print)
| ISBN 1593279744 (print)
Subjects: LCSH: Micro:bit--Juvenile literature. | Single-board
computers--Juvenile literature. | Electronics--Data processing--Juvenile
literature. | Python (Computer program language)--Juvenile literature. |
JavaScript (Computer program language)--Juvenile literature.
Classification: LCC QA76.8.M47 (ebook) | LCC QA76.8.M47 M66 2019 (print) |
DDC 004.16--dc23
LC record available at https://lccn.loc.gov/2019015785
No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.
Micro:bit, the micro:bit logo and the micro:bit device visual design are trademarks or registered trademarks of the Micro:bit Educational Foundation, which does not authorize or endorse this book.
The information in this book is distributed on an As Is basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it.
This book is dedicated to Gerard Paris.
A companion to my mother and a friend and inspiration to all that know him.
ABOUT THE AUTHOR
Simon Monk has a degree in Cybernetics and Computer Science and a PhD in Software Engineering. After spending many years in software and co-founding the mobile software company Momote, he now divides his time between writing books about electronics and programming and helping to run Monk Makes (https://www.monkmakes.com/), a business he started with his wife Linda, where he designs electronic kits and accessories for the BBC micro:bit and Raspberry Pi.
You can follow Simon on Twitter (@simonmonk2) and find out more about his books at https://www.simonmonk.org/.
ABOUT THE TECHNICAL REVIEWER
David Whale is an embedded software engineer and a STEM Ambassador who volunteers in schools in the UK. He has been an active member of both the Raspberry Pi and micro:bit communities since their inception. He contributed to the original BBC micro:bit project, advising The IET and BBC and helping to write and deliver resources and training to teachers around the country. He wrote a highly successful childrens coding book, Adventures in Minecraft (Wiley), and edits a wide range of tech books and magazine articles for well-known authors. David is on a mission to inspire the next generation of engineers and scientistsour future will soon be in their hands.
BRIEF CONTENTS
ACKNOWLEDGMENTS
I am very grateful to David Whale for finding the time to carry out the technical review of this book. It was a pleasure to work with him. Im also very grateful to the help and support of the Micro:bit Foundation and to the micro:bit community, who have helped out more than once on technical issues.
Id also like to thank Liz, Janelle, Bill, and everyone at No Starch Press and of course the very talented Miran Lipovaa for the wonderful and amusing illustrations.
INTRODUCTION
Since the release of the BBC micro:bit in 2016, millions of these devices have been distributed. Theyre enjoyed by both kids and adults all over the world. The micro:bit was designed as an easy way to teach kids programming skills. One of its great advantages is that you dont need anything more than a USB cable and a computer to start using it. Also, once programmed, it can be disconnected from a power source and run on batteries.
The micro:bit has a small LED display as well as sensors for light, movement, and magnetic fields, so it has everything you need to make interesting projects. When youre ready, you can easily connect things like motors, sensors, and loudspeakers using alligator clipstheres no need for soldering. In other words, your micro:bit can be the brain for lots of projects and inventions.
ABOUT THIS BOOK
In these pages, youll find a variety of experiments and projects. The experiments show you how things work, and then in the projects, youll use that knowledge to make something funky.
The book is divided into 10 chapters. tells you all you need to know about connecting and using your micro:bit. Youll use this information in all the experiments and projects in this book. Each of the following chapters deals with a specific topic, such as light, sound, and movement. There are lots of fun and useful things you can do with your micro:bit!
Experiments
Heres a list of the experiments in the book:
Generating sounds Learn to make your micro:bit play musical notes and other sounds.
It speaks! Teach your micro:bit to speak!
Sensing light