Make: Arduino Bots and Gadgets

Book description

Want to build your own robots, turn your ideas into prototypes, control devices with a computer, or make your own cell phone applications? It's a snap with this book and the Arduino open source electronic prototyping platform. Get started with six fun projects and achieve impressive results quickly.

Gain the know-how and experience to invent your own cool gadgets.

With Arduino, building your own embedded gadgets is easy, even for beginners. Embedded systems are everywhere—inside cars, children’s toys, and mobile phones. This book will teach you the basics of embedded systems and help you build your first gadget in just a few days. Each learn-as-you-build project that follows will add to your knowledge and skills.

  • Experiment with Arduino, the popular microcontroller board
  • Build robots and electronic projects with easy-to-follow instructions
  • Turn your ideas into working physical prototypes
  • Use Android phones as remote controls in your projects
  • Work with an uncomplicated programming language created for artists, designers, and hobbyists
  • Get everyone involved, with projects that even beginners can build
  • Publisher resources

    View/Submit Errata

    Table of contents

    1. A Note Regarding Supplemental Files
    2. Preface
      1. Embedded Systems Are Everywhere
        1. Why Should You Study Embedded Systems?
        2. Intelligent Air Conditioning
        3. Sensors, Microcontrollers, and Outputs
      2. Learn Embedded Systems in a Week
        1. Classroom Use
      3. What You Need to Know
      4. How to Read This Book
      5. Contents of This Book
      6. Conventions Used in This Book
      7. Using Code Examples
      8. We’d Like to Hear from You
      9. Safari® Books Online
      10. Acknowledgments
    3. 1. Introduction
      1. Building Philosophy
        1. Prototype
        2. Start with Hello World
        3. Build in Small Steps
        4. Test in Steps
        5. Revert to the Last Known Good Version
        6. Read the Friendly Manual
        7. Document
      2. Reusing Parts
      3. Buying Components
      4. Useful Tools
        1. Hearing Protectors and Safety Glasses
        2. Needlenose Electronics Pliers
        3. Diagonal-Cutter Pliers
        4. Metal Saw
        5. Wire Strippers
        6. Screwdrivers
        7. Alligator Clips
        8. Electric Drill
        9. Leatherman
        10. Mini Drill
        11. Headlamp
        12. Hot-Glue Gun
        13. Nail Punch and Hammer
        14. Soldering Iron
        15. Multimeter
      5. Electronic Circuit Theory Review
        1. Voltage Creates an Electrical Current
        2. A Resistor Resists the Flow of Current
        3. Short Circuits Are Dangerous
        4. Closed Circuits Allow Electricity to Flow
        5. Ground = Zero Voltage Level
    4. 2. Arduino: The Brains of an Embedded System
      1. Why Arduino?
      2. Starting with Arduino
        1. Installing Arduino Software
          1. Windows 7
          2. Windows XP
          3. Ubuntu Linux
          4. Mac OS X
      3. Hello World with Arduino
      4. Structure of “Hello World”
      5. Arduino Uno
      6. Arduino Nano
    5. 3. Stalker Guard
      1. What You’ll Learn
      2. Tools and Parts
      3. Solderless Breadboard
      4. Jumper Wire
      5. Ping Ultrasonic Sensor
        1. Measuring Distance with the Ping Ultrasonic Sensor
        2. Distance-Measuring Program
      6. Vibration Motor
      7. Combining Components to Make the Stalker Guard
      8. Making the Motor Vibrate
      9. Providing Power from a Battery
      10. What’s Next?
        1. Ideas for Future Projects
      11. Making an Enclosure
        1. Utilizing an Ammo Pouch
        2. Wiring Up the Circuit
        3. Soldering Basics
        4. Using a Switch to Save Batteries
    6. 4. Insect Robot
      1. What You’ll Learn
      2. Tools and Parts
      3. Servo Motors
        1. Wiring Up the Circuit
        2. Using the Servo Library in Arduino
        3. Centering the Servo
        4. Moving the Servo
      4. Constructing the Frame
        1. Making the Legs
        2. Assembling the Frame
        3. Making the Holder for the Arduino
        4. Attaching a Battery
        5. Assembly
        6. Screwing the Legs in Place
      5. Programming the Walk
        1. Walking Forward
        2. Walking Backward
        3. Turning Backward
        4. Turning Forward
      6. Avoiding Obstacles Using Ultrasound
        1. Attaching the Ultrasonic Sensor
        2. Code
      7. What’s Next?
        1. Ideas for the Next Stage
    7. 5. Interactive Painting
      1. What You’ll Learn
      2. Tools and Parts
      3. Resistors
        1. Measuring Resistance with a Multimeter
      4. LEDs
      5. Detecting Motion Using Ultrasonic Sensors
        1. Reading All the Sensors
        2. Testing the Circuit Using LEDs
        3. Determining Direction with the Final Sensor
      6. Moving Images
      7. Installing Python
        1. Linux and Mac OS X
        2. Windows 7
          1. Download the installation packages
          2. Log in as an admin user
          3. Install Python
          4. Install PyGTK and other libraries
          5. Install the GTK+ Library
      8. Hello World in Python
        1. Hello Windows
      9. Communicating over the Serial Port
        1. Installing the PySerial Library
          1. Linux and Mac OS X
          2. Windows XP
        2. Reading the Serial Port
        3. Reading the Serial Port and PyGTK
      10. Displaying a Picture
      11. Scaling an Image to Full Screen
      12. Changing Images with Button Control
      13. Gesture-Controlled Painting in Full Screen
      14. Animating the Sliding Image
      15. Connecting Arduino with Processing
      16. Processing Code for the Painting
      17. The Finished Painting
      18. Creating an Enclosure
        1. Attaching the Sensors with Servo Extension Cables
      19. Building a Frame
    8. 6. Boxing Clock
      1. What You’ll Learn
      2. Tools and Parts
      3. Android Software Installation
        1. Ubuntu Linux Installation
        2. Windows 7 Installation
          1. Java 6 for Windows
          2. Eclipse
          3. Android SDK
          4. Configure your Path
        3. Mac OS X Installation
          1. Eclipse
          2. Android SDK
        4. Configuring the Android SDK
        5. Installing the Android Plug-in for Eclipse
        6. Configuring the Android Plug-in for Eclipse
      4. Creating a Boxing Clock in Android
        1. Beginning with “Hello World”
        2. Creating a User Interface
        3. Using a Timer for the Main Loop
        4. Adding Sound to the Boxing Clock
        5. Creating a Ringing Boxing Clock
        6. Setting Separate Rounds and Breaks
        7. Drawing Graphics with Custom Views
        8. Animating the Pie
        9. Finishing the Clock
          1. Put the resources in place
          2. Pause the program when it’s in the background
          3. Build the graphical user interface
        10. Installing on the Physical Phone
          1. Enable USB debugging
          2. Make the physical connection
          3. Configure Linux for DDMS
          4. Configure Windows USB settings and drivers
          5. Run the app on the phone
        11. Differences Between the Emulator and Phone
      5. What’s Next?
    9. 7. Remote for a Smart Home
      1. What You’ll Learn
      2. Tools and Parts
      3. The Relay: A Controllable Switch
        1. Toggling a Relay with Arduino
      4. Hacking the Remote Control
        1. Disassembly
        2. Testing
        3. Soldering
      5. Controlling the Arduino from the Computer
        1. Toggling an LED with the Serial Port
        2. Connecting Relays to the Switches
        3. Six-Switch Code
      6. Creating a Graphical User Interface
        1. Pack Many Buttons into One Window
        2. Button Orientation
        3. Stretching Like Bubble Gum
      7. The Finished Remote Control Interface
      8. Creating an Enclosure
    10. 8. Soccer Robot
      1. What You Will Learn
      2. Tools and Parts
      3. Continuous Rotation Servos
        1. Centering (Stopping) the Servo
        2. Finding the Center Point
        3. Rotating to Different Directions
      4. Modding a Standard Servo into a Continuous Rotation Servo
      5. Connecting the Arduino to the Bluetooth Mate
        1. Windows 7
        2. Ubuntu Linux
        3. Mac OS X
      6. Testing the Bluetooth Connection
      7. Building a Frame for the Robot
        1. Making the Servo Attachments
        2. Making the Wheels
        3. Attaching the Rear Wheel
        4. Building the Kicker Leg
        5. Adding the Front Fork
        6. Attaching the Servos
        7. Putting the Wires, Arduino, and Battery Compartment in Place
      8. Programming the Movements
        1. Moving Forward
        2. Moving in Other Directions
        3. Kicking
      9. Controlling Movement from a Computer
      10. Steering with an Android Cell Phone
        1. Creating a Simple User Interface
        2. Adding Permission to Vibrate
      11. The Accelerometer
      12. An Easier Approach to Bluetooth
        1. Blinking LEDs with Bluetooth
        2. Creating a Bluetooth Connection, Section by Section
        3. Adding tBlue to the Project
        4. Talking to the Arduino over Bluetooth
      13. Controlling the Robot with Cell Phone Motion
        1. Arduino Code
      14. Completing the Soccer Robot
        1. Executing the Program
        2. Playing Soccer
      15. What’s Next?
    11. A. tBlue Library for Android
    12. Index
    13. About the Authors
    14. Colophon
    15. Copyright

    Product information

    • Title: Make: Arduino Bots and Gadgets
    • Author(s): Tero Karvinen, Kimmo Karvinen
    • Release date: March 2011
    • Publisher(s): Make: Community
    • ISBN: 9781449389710