12,99 €
Arduino programming for the absolute beginner, with project-based learning Adventures in Arduino is the beginner's guide to Arduino programming, designed specifically for 11-to 15-year olds who want to learn about Arduino, but don't know where to begin. Starting with the most basic concepts, this book coaches you through nine great projects that gradually build your skills as you experiment with electronics. The easy-to-follow design and clear, plain-English instructions make this book the ideal guide for the absolute beginner, geared toward those with no computing experience. Each chapter includes a video illuminating the material, giving you plenty of support on your journey to electronics programming. Arduino is a cheap, readily available hardware development platform based around an open source, programmable circuit board. Combining these chips with sensors and servos allows you to gain experience with prototyping as you build interactive electronic crafts to bring together data and even eTextiles. Adventures in Arduino gets you started on the path of scientists, programmers, and engineers, showing you the fun way to learn electronic programming and interaction design. * Discover how and where to begin Arduino programming * Develop the skills and confidence to tackle other projects * Make the most of Arduino with basic programming concepts * Work with hardware and software to create interactive electronic devices There's nothing like watching your design come to life and interact with the real world, and Arduino gives you the capability to do that time and again. The right knowledge combined with the right tools can create an unstoppable force of innovation, and your curiosity is the spark that ignites the flame. Adventures in Arduino gets you started on the right foot, but the path is totally up to you.
Sie lesen das E-Book in den Legimi-Apps auf:
Seitenzahl: 369
Veröffentlichungsjahr: 2015
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.
BECKY STEWART is an engineer and educator. She works with artists and designers to bring to life often crazy ideas—from 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.
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 can’t stop thanking Emilie Giles—Codasign 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.
I’d 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.
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 Director—Book 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
Cover
Title Page
About the Author
Introduction
What Is an Arduino?
What You Will Learn
Parts You Will Need
Tools You Will Need
Software You Will Need
Other Useful Materials
What I Assume You Already Know
How This Book Is Organised
Conventions
The Companion Website
Reaching Out
Adventure 1: Setting Up Your Arduino
What You Need
Downloading and Installing the Arduino Software on Your Computer
Using Blink to Test That Everything Is Set Up Correctly
Building an LED Circuit
Further Adventures with Arduino
Adventure 2: Reading from Sensors
What You Need
Adding More LEDs
Printing Messages to the Computer
Reading Data from a Potentiometer
Making Decisions in Code
Building a Status Message Sign
Further Adventures with Arduino
Adventure 3: Working with Servos
What You Need
Understanding Different Types of Motors
Controlling a Servo with Arduino
Repeating the Same Thing Over and Over
Digital Input with a Push Button
Building a Combination Safe
Further Adventures with Arduino
Adventure 4: Using Shift Registers
What You Need
Organising Your Code
Getting More Outputs with Shift Registers
Building Your Name in Lights
Further Adventures with Shift Registers
Adventure 5: Playing Sounds
What You Need
Making a List
Making Noise
Building an Augmented Wind Chime
Further Adventures with Sound
Adventure 6: Adding Libraries
What You Need
Analogue Out
Capacitive Sensing
Building a Crystal Ball
Further Adventures with Libraries
Adventure 7: Working with the Arduino Leonardo
What You Need
Introducing the Arduino Leonardo
Sensing Light
Building a Game Controller
Further Adventures with the Leonardo
Adventure 8: Working with the Lilypad Arduino USB
What You Need
Introducing the Lilypad Arduino USB
Getting Clever with Arrays
Passing Data Between Functions
Building a POV Hoodie
Further Adventures with the Lilypad
Adventure 9: The Big Adventure: Building a Marble Maze Game
What You Need
Part One: Scoring Points
Part Two: Designing Your Maze Game
Part Three: Writing the Code
Part Four: Building the Maze Game
Further Adventures: Continuing Your Adventures with Arduino
Adventure A: Where to Go From Here
More Boards, Shields, Sensors and Actuators
On the Web
Books
Adventure B: Where to Get Tools and Components
Starter Kits
Brick-and-Mortar Stores
Online Stores
Glossary
End User License Agreement
Introduction
FIGURE I-1 Arduino Uno (top left), Arduino Leonardo (bottom left) and Lilypad Arduino USB (right)
FIGURE I-2 A USB and USB Micro cable
FIGURE I-3 Breadboards in different sizes and colours
FIGURE I-4 Jumper wires
FIGURE I-5 Different types of LED, with a colour-changing LED on the right and below it a Lilypad LED
FIGURE I-6 Resistors needed for the projects in this book: 100Ω (top left), 220Ω (top right), 10kΩ (bottom left), 1MΩ (bottom middle) and 10MΩ (bottom right)
FIGURE I-7 Three different types of potentiometer
FIGURE I-8 A servo motor
FIGURE I-9 A tactile push button (left) and three different panel mount buttons (right)
FIGURE I-10 A shift register
FIGURE I-11 A piezo
FIGURE I-12 A light-dependent resistor
FIGURE I-13 Male header pins
FIGURE I-14 Solid core wire (left) and stranded wire (right)
FIGURE I-15 Enamelled (left) and plastic coated (right) wire
FIGURE I-16 Solder on spools
FIGURE I-17 A 9V battery-to-DC-barrel connector (left) and a UK plug for a USB cable (right)
FIGURE I-18 Alligator clips
FIGURE I-19 Conductive thread
FIGURE I-20 A soldering iron
FIGURE I-21 Different kinds of wire stripper
FIGURE I-22 Wire cutters
FIGURE I-23 Pairs of pliers
FIGURE I-24 A multimeter
FIGURE I-25 A pair of scissors and a utility knife
Chapter 1
FIGURE 1-1 An Arduino Uno and USB cable
FIGURE 1-2 You can download the Arduino IDE for your computer from the Arduino website.
FIGURE 1-3 Plug the USB cable into the Arduino Uno and then connect it to your computer.
FIGURE 1-4 The Arduino program icon
FIGURE 1-5 The important parts of the Arduino IDE
FIGURE 1-6 The built-in LED on the Arduino board is near the number 13.
FIGURE 1-7 Opening the Blink sketch, which is located in the examples that are included with the Arduino IDE
FIGURE 1-8 Selecting the board you are using
FIGURE 1-9 Selecting the port your Arduino board is plugged into
FIGURE 1-10 Message in the Arduino IDE after successfully uploading your code
FIGURE 1-11 A common error when the computer can’t talk with the Arduino
FIGURE 1-12 The electronic components you need to build the circuit
FIGURE 1-13 The circuit schematic for the LED circuit
FIGURE 1-14 A breadboard has a series of holes that are connected in rows with two pairs of long rows on the outside and shorter, perpendicular rows in the centre of the board.
FIGURE 1-15 Basic layout of a breadboard
FIGURE 1-16 The LED circuit on the breadboard
FIGURE 1-17 The digital pins on the Arduino board. Digital Pins 0 and 1 are special pins that you learn about later.
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!
Lesen Sie weiter in der vollständigen Ausgabe!