Docsity
Docsity

Prepare-se para as provas
Prepare-se para as provas

Estude fácil! Tem muito documento disponível na Docsity


Ganhe pontos para baixar
Ganhe pontos para baixar

Ganhe pontos ajudando outros esrudantes ou compre um plano Premium


Guias e Dicas
Guias e Dicas


beginning - arduino, Notas de estudo de Automação

Apostila de Arduino

Tipologia: Notas de estudo

2012

Compartilhado em 29/12/2012

leticia-mo-10
leticia-mo-10 🇧🇷

2 documentos

1 / 459

Toggle sidebar

Esta página não é visível na pré-visualização

Não perca as partes importantes!

bg1
Michael McRoberts
TECHNOLOGY IN ACTION
Beginning
Arduino
50 ARDUINO PROJECTS WITH
STEP-BY-STEP INSTRUCTIONS
AND EASY-TO-FOLLOW DIAGRAMS
LEARN HOW TO WORK WITH
MOTORS, SENSORS, DISPLAYS,
AND NETWORKING
CREATE SIMPLE BUT PRACTICAL
PROJECTS SUCH AS A
RANGEFINDER, AN RFID READER,
AND AN INTERNET WEATHER
DISPLAY
NO PROGRAMMING OR
ELECTRONICS EXPERIENCE NEEDED
Michael McRobertsMichael McRoberts
50 ARDUINO PROJECTS WITH
STEP-BY-STEP INSTRUCTIONS
AND EASY-TO-FOLLOW DIAGRAMS
MOTORS, SENSORS, DISPLAYS,
CREATE SIMPLE BUT PRACTICAL
RANGEFINDER, AN RFID READER,
AND AN INTERNET WEATHER
ELECTRONICS EXPERIENCE NEEDED
50 ARDUINO PROJECTS WITH
STEP-BY-STEP INSTRUCTIONS
AND EASY-TO-FOLLOW DIAGRAMS
MOTORS, SENSORS, DISPLAYS,
CREATE SIMPLE BUT PRACTICAL
ELECTRONICS EXPERIENCE NEEDED
ELECTRONICS EXPERIENCE NEEDED
McRoberts
Arduino
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Pré-visualização parcial do texto

Baixe beginning - arduino e outras Notas de estudo em PDF para Automação, somente na Docsity!

Michael McRoberts

TECHNOLOGY IN ACTION™

Beginning

Arduino

50 ARDUINO PROJECTS WITH STEP-BY-STEP INSTRUCTIONS AND EASY-TO-FOLLOW DIAGRAMS

LEARN HOW TO WORK WITH MOTORS, SENSORS, DISPLAYS, AND NETWORKING

CREATE SIMPLE BUT PRACTICAL PROJECTS SUCH AS A RANGEFINDER, AN RFID READER, AND AN INTERNET WEATHER DISPLAY

NO PROGRAMMING OR ELECTRONICS EXPERIENCE NEEDED

Michael McRobertsMichael McRoberts

50 ARDUINO PROJECTS WITH STEP-BY-STEP INSTRUCTIONS AND EASY-TO-FOLLOW DIAGRAMS

MOTORS, SENSORS, DISPLAYS,

CREATE SIMPLE BUT PRACTICAL

RANGEFINDER, AN RFID READER, AND AN INTERNET WEATHER

ELECTRONICS EXPERIENCE NEEDED

50 ARDUINO PROJECTS WITH STEP-BY-STEP INSTRUCTIONS AND EASY-TO-FOLLOW DIAGRAMS

MOTORS, SENSORS, DISPLAYS,

CREATE SIMPLE BUT PRACTICAL

RANGEFINDER, AN RFID READER,

ELECTRONICS EXPERIENCE NEEDEDELECTRONICS EXPERIENCE NEEDED

Beginning Arduino

Copyright © 2010 by Michael McRoberts

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-13 (pbk): 978-1-4302-3240-

ISBN-13 (electronic): 978-1-4302-3241-

Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1

Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.

The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.

President and Publisher: Paul Manning Lead Editor: Michelle Lowman Technical Reviewer: Josh Adams Editorial Board: Steve Anglin, Mark Beckner, Ewan Buckingham, Gary Cornell, Jonathan Gennick, Jonathan Hassell, Michelle Lowman, Matthew Moodie, Duncan Parkes, Jeffrey Pepper, Frank Pohlmann, Douglas Pundick, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh Coordinating Editor: Jennifer L. Blackwell Copy Editor: Mary Behr Production Support: Patrick Cunningham Indexer: Julie Grady Artist: April Milne Cover Designer: Anna Ishchenko

Distributed to the book trade worldwide by Springer Science+Business Media, LLC., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail [email protected], or visit www.springeronline.com.

For information on translations, please e-mail [email protected], or visit www.apress.com.

Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales–eBook Licensing web page at www.apress.com/info/bulksales.

The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress 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 this work.

The source code for this book is available to readers at www.apress.com.

I would like to dedicate this book to my mother for her encouragement throughout the book process and for being the best Mum anyone could ask for, and to my grandfather, Reginald Godfrey, for igniting the spark for science and electronics in me at a young age. Without all those kits from Radio Shack at Christmas I may never have reached the point where I ended up writing a book about microcontrollers and electronics. Thank you both.

v

Contents

About the Author .................................................................................................... xvii

About the Technical Reviewer ............................................................................... xviii

Acknowledgments ................................................................................................... xix

Introduction .............................................................................................................. xx

■Chapter 1: Introduction ........................................................................................... 1

How to Use This Book ........................................................................................................ 1

What You Will Need ........................................................................................................... 2

What Exactly is an Arduino? .............................................................................................. 3

Getting Started................................................................................................................... 6

Windows XP Installation ........................................................................................................................... 7

Windows 7 & Vista Installation ................................................................................................................. 7

Mac OSX Installation................................................................................................................................. 7

Board and Port Selection .......................................................................................................................... 8

Upload Your First Sketch ................................................................................................. 10

The Arduino IDE ............................................................................................................... 12

■Chapter 2: Light ’Em Up ......................................................................................... 21

Project 1 – LED Flasher ................................................................................................... 21

Parts Required ........................................................................................................................................ 21

Connecting Everything ............................................................................................................................ 22

Enter the Code ........................................................................................................................................ 23

■ CONTENTS

■ CONTENTS

■ CONTENTS

■ CONTENTS

■ CONTENTS

■ CONTENTS

■ CONTENTS

xvii

About the Author

■Michael McRoberts discovered the Arduino in 2008 while looking for ways to connect a temperature sensor to a PC to make a Cloud Detector for his other hobby of astrophotography. After a bit of research, the Arduino seemed like the obvious choice, and the Cloud Detector was successfully made, quickly and cheaply. Mike’s fascination with the Arduino had begun. Since then he has gone on to make countless projects using the Arduino. He had also founded an Arduino starter kit and component online business called Earthshine Electronics. His next project is to use an Arduino-based circuit to send a high altitude balloon up to the edge of space to take stills and video for the heck of it, with the help of the guys from UKHAS and CUSF. Mike’s hobby of electronics began as a child when the 100-in-1 electronics kits from Radio Shack made up his Christmas present list. He started programming as a hobby when he obtained a Sinclair ZX81 computer as a teenager. Since then, he’s never been without a computer. Recently, he’s become a Mac convert. He is a member of London Hackspace and the Orpington Astronomical Society and can regularly be found contributing to the Arduino Forum. He also likes to lurk on IRC in the Arduino, high altitude and london-hack-space channels (as “earthshine”), and on Twitter as “TheArduinoGuy.” When he is not messing around with Arduinos or running Earthshine Electronics, he likes to indulge in astronomy, astrophotography, motorcycling, and sailing.

xviii

About the Technical Reviewer

■Josh Adams is a developer and architect with over nine years of professional experience building production-quality software and managing projects. He built a Tesla Coil for a high school science project that shot 27-inch bolts of lightning. As Isotope Eleven's lead architect, Josh is responsible for overseeing architectural decisions and translating customer requirements into working software. Josh graduated from the University of Alabama at Birmingham (UAB) with Bachelor of Science degrees in both Mathematics and Philosophy. In his free time (ha!), Josh provided the technical review for this book on programming with the Arduino microprocessor. When he's not working, Josh enjoys spending time with his family.