arduino_robotics.pdf

(20945 KB) Pobierz
For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
Contents at a Glance
About the Authors................................................................................................ xix
About the Technical Reviewers ........................................................................... xxi
Acknowledgments .............................................................................................. xxii
Introduction ....................................................................................................... xxiv
Chapter 1: Introducing Oracle APEX .......................................................................1
Chapter 1: The Basics .............................................................................................1
Chapter 2: Arduino for Robotics ...........................................................................51
Chapter 3: Let’s Get Moving..................................................................................83
Chapter 4: Linus the Line-Bot .............................................................................119
Chapter 5: Wally the Wall-Bot.............................................................................169
Chapter 6: Making PCBs .....................................................................................203
Chapter 7: The Bug-Bot.......................................................................................257
Chapter 8: Explorer-Bot ......................................................................................295
Chapter 9: RoboBoat ...........................................................................................331
Chapter 10: Lawn-Bot 400 ..................................................................................403
Chapter 11: The Seg-Bot .....................................................................................453
Chapter 12: The Battle-Bot .................................................................................513
Chapter 13: Alternate Control .............................................................................563
Index ...................................................................................................................581
iv
Introduction
This book was written for anyone interested in learning more about the Arduino and robotics in general.
Though some projects are geared toward college students and adults, several early chapters cover
robotics projects suitable for middle-school to high-school students. I will not, however, place an age
restriction on the material in this book, since I have seen some absolutely awesome projects created by
makers both young and old.
Prerequisites
Ultimately, you will need to be able to use some basic power tools, hand tools, a voltage meter, and
soldering iron. Do not worry if you are not yet experienced in these areas, as your first experience will get
you well on your way (you have to start somewhere)! Just like riding a bike, you will get better at it the
more you do it.
If you are an experienced robot builder, you will likely be able to improve upon some of my
methods. If, however, you are a beginner, you might end up with a few extra holes drilled in the wrong
spot, a wheel that is not mounted perfectly straight, or a downright ugly robot. Do not worry about trying
to complete every step perfectly the first time; do your best the first time around and then go back and
improve upon it later. It is better to have an imperfect robot that you can work on than no robot at all
because you were too afraid to try!
In conclusion, this book is intended to provide fun projects for those interested in the Arduino. If
you are working on one of these projects and you aren’t having fun, you’re doing it wrong. If you get
stuck on a project, please ask for help—nobody wants you to be frustrated, but learning something new
can sometimes make you want to drive your head through a wall...don’t do that. Just keep with it, and
you will
eventually
figure out your problem. I have created a Google web site to host the files for each
project and provide a place to ask questions and get help:
https://sites.google.com/site/arduinorobotics/
If you would like to try some other Arduino projects, dealing with various types of sensors, LEDs,
home automation, and various other projects, you might consider the following Arduino books from
Apress:
Practical Arduino
by Jonathan Oxer and Hugh Blemings (2009)
Beginning Arduino
by Michael McRoberts (2010)
John-David Warren
xxiv
CHAPTER 1

The Basics
The Arduino microcontroller (Figure 1-1) is like a little command center that is awaiting your orders.
With a few lines of code, you can make your Arduino turn a light on or off, read a sensor value and
display it on your computer screen, or even use it to build a homemade circuit to repair a broken kitchen
appliance. Because of the versatility of the Arduino and the massive support available from the online
community of Arduino users, it has attracted a new breed of electronics hobbyists who have never
before touched a microcontroller, let alone programmed one.
Figure 1-1.
An Arduino Duemilanove microcontroller
The basic idea of the Arduino is to create an atmosphere where
anyone
who is interested can
participate and contribute with little upfront cost. A basic Arduino board can be found online for around
$20, and all of the software needed to program the Arduino is open-source (free to use and modify). You
need only a computer and a standard USB cable. In addition to being inexpensive, the creators of
1
Zgłoś jeśli naruszono regulamin