make_lego_and_arduino_projects.pdf

(111725 KB) Pobierz
Make: Lego and
Arduino Projects
John Baichtal, Matthew Beckler & Adam Wolf
Sebastopol
Make: Lego and Arduino Projects
by John Baichtal, Matthew Beckler & Adam Wolf
Copyright © 2013 John Baichtal, Matthew Beckler, and Adam Wolf. All rights reserved.
Printed in the United States of America.
Published by Maker Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
Maker Media books may be purchased for educational, business, or sales promotional use. Online editions are also avail-
able for most titles (oreilly.com). For more information, contact our corporate/institutional sales department: 800-998-9938
or
corporate@oreilly.com.
Editors:
Dale Dougherty and Brian Jepson
Development Editor:
Brian Jepson
Production Editor:
Kristen Borg
Proofreader:
nSight, Inc.
Indexer:
WordCo Indexing Services
December 2012:
First Edition.
Cover Designers:
Mark Paglietti and Randy Comer
Interior Designer:
Ron Bilodeau
Production Services:
Peter Amirault
Illustrators:
Matthew Beckler, Rebecca Demarest
Cover Photographer:
Adam Wolf
Revision History for the 1st Edition:
2012-11-14
2013-02-22
2019-12-20
First release
Second release
Third release
See
http://oreilly.com/catalog/errata.csp?isbn=0636920024316
for release details.
Make logo and Maker Media logos are registered trademarks of Maker Media, Inc. Many of the designations used by manu-
facturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book,
and Maker Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility
for errors or omissions, or for damages resulting from the use of the information contained herein.
ISBN: 978-1-449-32106-2
[LSI]
Contents
Foreword
.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
vii
Preface
.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ix
1.
. Project:.Drawbot
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
Parts List
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
Assembly Instructions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
Program the Robot
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24
The Next Chapter
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
2.
. Anatomy.of.Lego.Robotics
.. . . . . . . . . . . . . . . . .
31
Mindstorms
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
32
Expanding on the Mindstorms Set
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
39
Programming Your Brick
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
45
The Next Chapter
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
47
3.
. Arduino.Interlude
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
49
History of the Arduino Project
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
50
What Is OSHW?
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
51
Anatomy of the Uno
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
53
The Arduino Ecosystem
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
56
Arduino Resources
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
62
The Next Chapter
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
67
iii
Zgłoś jeśli naruszono regulamin