Arduino and Kinect Projects: Design, Build, Blow Their Minds

Book description

If you've done some Arduino tinkering and wondered how you could incorporate the Kinect—or the other way around—then this book is for you. The authors of Arduino and Kinect Projects will show you how to create 10 amazing, creative projects, from simple to complex. You'll also find out how to incorporate Processing in your project design—a language very similar to the Arduino language.

The ten projects are carefully designed to build on your skills at every step. Starting with the Arduino and Kinect equivalent of "Hello, World," the authors will take you through a diverse range of projects that showcase the huge range of possibilities that open up when Kinect and Arduino are combined.

  • Gesture-based Remote Control. Control devices and home appliances with hand gestures.

  • Kinect-networked Puppet. Play with a physical puppet remotely using your whole body.

  • Mood Lamps. Build your own set of responsive, gesture controllable LED lamps.

  • Drawing Robot. Control a drawing robot using a Kinect-based tangible table.

  • Remote-controlled Vehicle. Use your body gestures to control a smart vehicle.

  • Biometric Station. Use the Kinect for biometric recognition and checking Body Mass Indexes.

  • 3D Modeling Interface. Learn how to use the Arduino LilyPad to build a wearable 3D modelling interface.

  • 360° Scanner. Build a turntable scanner and scan any object 360° using only one Kinect.

  • Delta Robot. Build and control your own fast and accurate parallel robot.

Table of contents

  1. Cover
  2. Title
  3. Copyright
  4. Dedication
  5. Contents at a Glance
  6. Contents
  7. About the Authors
  8. About the Technical Reviewer
  9. Acknowledgments
  10. Introduction
  11. Chapter 1: Arduino Basics
    1. What is Arduino?
    2. A Brief History of Arduino
    3. Installing Arduino
      1. Installation on Mac OS X
      2. Installation on Windows
      3. Installation on Linux
    4. Testing the Arduino
    5. Arduino Hardware
      1. Arduino Input and Output Pins
        1. Digital Pins
        2. Analog Input Pins
      2. Pull-Up Resistors
      3. Arduino Shields
    6. Arduino IDE
      1. Serial Monitor
    7. Arduino Language
      1. The setup() Function
      2. The loop() Function
      3. Variables
        1. Variable Declaration and Initialization
        2. Variable Scope
    8. Your First Arduino Project
      1. Breadboard
      2. Building the Circuit
      3. Programming the Arduino
        1. The setup() Function
        2. The loop() Function
    9. Circuit Diagrams
      1. Fritzing
      2. Electronic Symbols
    10. Electricity
      1. AC/DC
      2. Ohms Law
      3. Joule’s Law
    11. Summary
  12. Chapter 2: Kinect Basics
    1. A Brief History of the Kinect
      1. Hacking the Kinect
      2. Official Frameworks
    2. The Kinect Sensor
      1. Positioning your Kinect
    3. Kinect Capabilities
      1. RGB Image
      2. IR Image
      3. Depth Map
      4. Hand and Skeleton Tracking
    4. Kinect Drivers and Frameworks
      1. OpenKinect: Libfreenect Drivers
      2. PrimeSense: OpenNI and NITE
        1. OpenNI
        2. NITE
      3. Microsoft Kinect for Windows
    5. Kinect Theory
      1. Structured-Light 3D Scanning
      2. Converting the Light Coding Image to a Depth Map
    6. Kinect Alternative: ASUS Xtion PRO
    7. Summary
  13. Chapter 3: Processing
    1. Processing Language
    2. Installing Processing
    3. Processing IDE
    4. A First Processing Sketch
      1. Processing Variables
        1. Variable Scope
      2. Structure of a Processing Sketch
        1. setup() Function
        2. draw() Function
    5. Processing Libraries
    6. Simple-OpenNI
      1. Installing Simple-OpenNI
        1. Installation on Windows
        2. Installation in Mac OS X
        3. Installation on Linux
    7. Accessing the Depth Map and RGB Image
    8. The Third Dimension
      1. Processing in 3D
        1. Matrix Transforms
      2. Camera Control Libraries
      3. KinectOrbit Example
    9. Kinect Space
      1. Linear and Two-Dimensional Arrays
    10. Coloring the Point Cloud
    11. NITE Functions
      1. Hand Tracking
      2. Skeleton Tracking
    12. Summary
  14. Chapter 4: Arduino and Kinect: “Hello World”
    1. Parts List for Hello World
    2. Serial Communication
      1. Serial-Controlled LED
        1. Pulse Width Modulation
        2. PWM-Controlled LED
    3. Writing Your Own Communication Protocol
      1. Serial-Controlled LEDs
    4. Kinect-Controlled LEDs
    5. Feedback from Arduino
    6. Summary
  15. Chapter 5: Kinect Remote Control
    1. Parts List for Kinect Remote Control
    2. Hacking a Remote Control
    3. Connecting the Remote to Arduino
      1. Assembling the Prototype Shield
    4. Testing the Circuit
    5. Kinect Hand Tracking and Gesture Recognition
      1. Libraries and Setup
      2. NITE Callbacks
      3. Draw Loop and Other Functions
      4. Connecting the Processing Sketch to Arduino
    6. Summary
  16. Chapter 6: Kinect Networked Puppet
    1. The Puppet
      1. Servos
      2. Building the Stage
      3. Building the Puppet
    2. Building the Circuit
      1. Testing the Servos
      2. Setting the Servos to the Starting Position
    3. Skeleton Tracking On-Screen
      1. Simple-OpenNI Events
    4. Angle Calculation
    5. Network Communication
      1. Communicating Within a Local Network
      2. Communicating over the Internet
    6. Server Applet: Sending the Angles over a Network
    7. Client Applet: Controlling the Puppet
    8. Final Arduino Code
    9. Summary
  17. Chapter 7: Mood Lamps
    1. RGB Color Space
    2. Arduino Nano
    3. Building the Circuit
      1. Resistors
      2. Understanding Resistor Color Codes
      3. Testing the Circuit
    4. XBee Wireless Module
    5. Arduino Programming
    6. The Lamp Class
      1. Object-Oriented Programming
        1. Class Declaration
        2. Field Description
        3. Constructor
        4. Methods
    7. User Control Sketch
      1. Variable Declaration
      2. Setup() Function
      3. Draw() Function
      4. User Control
        1. Lamp Control
        2. Lamp Creation
      5. Data Storage and Retrieval
      6. Serial Communication
      7. Display Functions
      8. Simple-OpenNI Callbacks
    8. Summary
  18. Chapter 8: Kinect-Driven Drawing Robot
    1. Building the Robot
      1. Part 1
      2. Part 2
      3. Part 3
      4. The Base
    2. Building the Circuit
    3. Testing the Circuit
      1. Firmata and the Arduino Library for Processing
      2. Servo Test
    4. Robot Simulation
      1. Angle Measuring Program
      2. Robot Simulation Program
    5. Driving the Physical Robot
    6. Kinect: Tangible Table Interface
      1. Calibrating the Point Cloud
        1. Rotation Equations
        2. Rotating the Point Cloud
        3. Point Cloud Filtering
        4. Finding the Finger Position
    7. Virtual Robot Model
      1. Polishing the Input
    8. The Drawing Robot in Action
    9. Summary
  19. Chapter 9: Kinect Remote-Controlled Vehicles
    1. Electrical Motors and the H-Bridge
    2. Hacking a Car
    3. Building the Circuit
    4. Testing the Circuit
      1. Setup Function
      2. Draw Function
      3. DrawVector Function
      4. Car Function
      5. SendSerial Function
      6. Arduino Testing Sketch
        1. Setup Function
        2. Loop Function
        3. Turning Functions
        4. Move Functions
        5. Enable/Disable Functions
    5. Proximity Sensors
      1. Setup Function
      2. Loop Function
      3. Move Functions
    6. XBee and Wireless
    7. Kinect RC Interface
      1. Setup Function
      2. Draw Function
      3. Other Functions
    8. Summary
  20. Chapter 10: Biometric Station
    1. Hacking a Bathroom Scale
      1. Seven-Segment LCD
      2. Hacking the LCD
    2. Acquiring the LCD Signal
      1. Reading the LCD Signal
      2. Sending the Signal to Processing
    3. Decoding the LCD Signal
    4. Using the Weight Data
    5. Implementing the Biometric Recognition
      1. Imports and Variable Declaration
      2. Setup Function
      3. User Interface
      4. Draw Function
      5. Additional Functions
        1. New User
        2. Updating User Data
        3. Updating User Height
        4. Saving the User
        5. User Recognition
        6. Reading and Drawing the Chart
        7. Graphic Output
        8. Serial Event
        9. Simple-OpenNI User Events
    6. Summary
  21. Chapter 11: 3D Modeling Interface
    1. The Interface
    2. Arduino LilyPad
    3. Flex Sensors
    4. Sewing the Circuit
    5. Testing the Circuit
      1. Arduino Serial Sender
      2. Processing Glove Data Receiver
    6. Going Wireless
      1. LilyPad XBee
      2. SoftwareSerial Library
      3. Wireless Arduino Code
    7. Implementing the Modeling Interface
      1. The GloveInterface Class
        1. Setter Functions
        2. Display Functions
        3. Calibrating the Interface
      2. Geometric Classes
        1. Point Class
        2. Line Class
        3. Shape Class
      3. Modeling Interface Main Program
        1. Imports and Fields
        2. Setup Function
        3. Draw Function
        4. Additional Functions
        5. Processing Callbacks
        6. Simple-OpenNI Callbacks
    8. Summary
  22. Chapter 12: Turntable Scanner
    1. The Theory
    2. Building a Turntable
      1. Connecting the Gears
    3. Building the Circuit
    4. Arduino Code
    5. Processing Code
      1. Variable Declaration
      2. Setup and Draw Functions
      3. Additional Functions
    6. Exporting the Point Cloud
      1. The exportPly Function
    7. Surface Reconstruction in Meshlab
    8. Summary
  23. Chapter 13: Kinect-Controlled Delta Robot
    1. About This Project
    2. The Delta Robot
    3. Building a Delta Robot
      1. The Legs
      2. The Base
      3. The Effector
      4. The Gripper
      5. Hanging the Robot
    4. Building the Circuit
    5. Delta Robot Simulation Software
      1. Inverse Kinematics
      2. DeltaRobot Class
      3. deltaLeg Class
      4. Driving the Delta Robot Simulation with the Mouse
    6. Kinect-Controlled Delta Robot
      1. Gripper Control
      2. Sending the Data to Arduino
    7. Arduino Code
    8. Summary
  24. Index

Product information

  • Title: Arduino and Kinect Projects: Design, Build, Blow Their Minds
  • Author(s): Enrique Ramos Melgar, Ciriaco Castro Díez, Przemek Jaworski
  • Release date: March 2012
  • Publisher(s): Apress
  • ISBN: 9781430241676