This edition first published 2015
2015 John Wiley and Sons, Ltd.
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. 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-118-94847-7 (paperback); ISBN 978-1-118-94846-0 (ePub); 978-1-118-94845-3 (ePDF)
To every student ever told they had to choose between the arts and sciences.
About the Author
BECKY STEWART is an engineer and educator. She works with artists and designers to bring to life often crazy ideasfrom shoes that show you how to get home to suspension bridges that can be played like giant harps. After completing a PhD in Electronic Engineering at Queen Mary University of London, Becky helped found Codasign, an education company that creates technology workshops for art galleries and museums. At Codasign she teaches artists and designers how to use electronics and code as creative tools. She documents her projects at http://theleadingzero.com
.
Acknowledgments
My first thanks go to Alexandra Deschamps-Sonsino, without whom I would have never started this book. I also offer my sincere gratitude to Alex for her work with Tinker that jumpstarted the Arduino community in London.
None of this would have been possible without the support of the amazing educators that form Codasign. I have learned much from Melissa Coleman and Pollie Barden about how to improve my Arduino teaching, and I am constantly learning from Adam Stark about how to better teach programming concepts. I cant stop thanking Emilie GilesCodasign would grind to a halt without you; thank you for everything you do. I give a particularly huge thank-you to Liat Wassershtrom for all your feedback and expertise.
Id like to also thank the artistic and editorial staff that helped shape this book. It has been greatly improved by your guidance.
Lastly, thank you to my family who have supported me in everything I do. Thank you to my parents, who provided a quiet place to sit and write, and to Ben, who has patiently tolerated our wedding planning and vacations being punctuated by writing.
Publishers Acknowledgements
Some of the people who helped bring this book to market include the following:
Editorial
Series Creator: Carrie Anne Philbin
VP Consumer and Technology Publishing Director: Michelle Leet
Associate DirectorBook Content Management: Martin Tribe
Professional Technology & Strategy Director: Barry Pruett
Acquisitions Editor: Aaron Black
Project Editor: Charlotte Kughen
Copy Editor: Grace Fairley
Technical Editor: Russell Barnes
Editorial Manager: Mary Beth Wakefield
Editorial Assistant: Jessie Phelps
Marketing
Marketing Manager: Lorna Mein
Marketing Assistant: Polly Thomas
Adventures in Arduino
Contents
List of Illustrations
- Introduction
- Chapter 1
- Chapter 2
- Chapter 3
- Chapter 4
- Chapter 5
- Chapter 6
- Chapter 7
- Chapter 8
- Chapter 9
Guide
Pages
Introduction
ARE YOU AN adventurer? Do you boldly embark on new endeavours, tackling new skills and mastering new tools? Do you want to learn how to use technology to make your ideas burst into life? Are you curious about how you can combine computer code and electrical circuits with scissors and paperor even needle and thread? If the answer is an emphatic yes then this is the book for you!
What Is an Arduino?
The Arduino is a tool for building computers that can interact with the physical world around you. You can use it to connect sensors that detect sound, light or vibration, then turn on a light, change its colour, move a motor and much more. The Arduino is the magical device that sits in the midst of all of these things. It reads in from sensors measuring the real world, makes decisions based on that data and then makes something happen in the real world, whether light, sound or movement.
The Arduino is usually a blue board about the size of your hand. It has white writing on it labelling its different sections and has all its chips and circuits exposed. There are different types of Arduino boards, and they arent all blue, but you will learn more about that later in the Parts You Will Need section and also in .
The Arduino is a microcontroller. A microcontroller is a simple computer. It cant do many things at the same time but it does what it is told to do really well. You already interact with lots of microcontrollers every day because they control things like microwaves and washing machines.
There are a lot of different types of microcontroller, but the special thing about Arduino is that it is designed for people who are just starting out. So, if you are new to code or electronics, thats okay because the Arduino is great for beginners. But dont underestimate itit can still take on big projects.
What You Will Learn
After completing these adventures, you will have learned how to set up the Arduino programming environment on your computer and how to write and upload code to your Arduino board. You will find out how to work with three different Arduino boards: the Uno, Leonardo and the Lilypad USB.
You will learn basic programming concepts that you can use beyond working with the Arduino. The Arduino language is based on the C/C++ language. This means that as you learn how to code Arduinos, you are also learning about how programming works on computers like a laptop or a Raspberry Pi.
Next page