文档介绍:Download from Wow! eBook <>
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 Author xi
About the Technical Reviewer xiii
Acknowledgments xv
Introduction xvii
■■Chapter 1: LEGO, Arduino, and The Ultimate Machine 1
■■Chapter 2: Using Sensors with the Android 27
■■Chapter 3: Twitter Pet 65
■■Chapter 4: RFID and the Crystal Ball 89
■■Chapter 5: Animating the TARDIS 111
■■Chapter 6: Controlling LEGO Trains with Arduino 149
■■Chapter 7: Building a Light-Sensitive Box 165
■■Appendix A: Parts List 183
Index 189
v
Introduction
For 80 years, The LEGO Group has produced building toys for children to enjoy. As technology has advanced, they
have introduced some ponents that were limited in different ways.
The Arduino is an open source microcontroller that allows interaction with all different forms of electronic
devices and sensors. It allows for many creative projects that can be controlled by a device that is a small,
low-puter.
bining these two flexible systems, myriad projects can be built that can do almost anything—the only
limit is your imagination.
xvii
Chapter 1
LEGO, Arduino, and The Ultimate
Machine
For years LEGO has produced their puter based system known as Mindstorms. It gave puter brain
to the plastic LEGO bricks that had been around for decades. While Mindstorms has advanced in the 15 years since
it was introduced, it was still limited based on the size of the LEGO Intelligent Brick and the available sensors and
motors. An alternative to using the LEGO Mindstorms is the Arduino microprocessor, a puter that can make
use of any ponents with some programming.
Introducing the Arduino
An Arduino (as seen in Figure 1-1) is an open source microcontroller that allows for programming and interaction;
it is programmed in C/C++ with an Arduino library to allow it to ac