Introduction

If you’ve done some Arduino tinkering and wondered how you could incorporate the Kinect in your projects — or the other way around — this book is for you.

If you haven’t actually done any tinkering but you are looking for a good way to get started, this book might also be for you. Even though this is not intended as an introductory book, we have tried to assume as little knowledge from the reader as possible, starting from the installation of every tool you will be using and thoroughly explaining every new concept appearing in the book.

The Structure of This Book

This is a practical book. As such, you are going to be driven through a series of projects evolving from simple to complex, learning all you need to know along the way. The book starts with three introductory chapters oriented to getting you acquainted with Arduino, Kinect, and Processing in the least amount of time possible so you can go straight into building cool projects. From Chapter 4, you will be led through a series of 10 fun projects increasing in complexity, starting with the Arduino and Kinect equivalent of "Hello World" and finishing with the construction and programming of a Kinect-driven delta robot.

The Content of the Chapters

Each chapter will lead you step-by-step through the construction of the physical project, the building of the necessary circuits, the programming of the Arduino board, and the implementation of the Processing programs that connect the Kinect data to your Arduino board. Most projects will involve the implementation of two separate programs, the Arduino program and the Processing program. Arduino code will be displayed in bold monospace typeface, like this:

digitalRead(AO); // This is Arduino Code

Processing programs will be written in normal monospace font style, like this:

fill(255,0,0); // This is Processing Code

In each chapter, you will be introduced to the specific concepts and techniques that you will need to build that particular project—and probably some of the following ones. If you are an experienced programmer, you might want to read this book non-sequentially, starting by the project that interests you the most. If you are a programming beginner, you will find it easier to start with the first project and build up your knowledge as you progress through the book.

This is a list of topics that will be introduced in each chapter, so if you are interested in a specific concept you can jump straight to the right project.

  • Chapter 1: You will learn everything you need to know about the Arduino platform, you will install the necessary drivers and software, and you will write your first Arduino program.
  • Chapter 2: This chapter will help you discover what’s inside that amazing new device that has changed human-computer interfaces: the Kinect.
  • Chapter 3: You will discover the Processing programming language and IDE. You will install Processing, build your first Processing programs, and learn a great deal about working in 3D.
  • Chapter 4: You will learn about communicating with Arduino and Kinect through serial, you will develop your own communication protocol, and you will use hand tracking for the first time. You will also learn how to use pulse width modulation and how to work with LEDs and light sensors.
  • Chapter 5: This chapter will teach you to hack a remote control and use body gestures to control your TV set. You will learn how to use relays and how to build a circuit on a prototyping shield. You will even develop your own gesture recognition routine.
  • Chapter 6: You will learn to work with servos and how to communicate through networks and over the Internet. You will also use Kinect’s skeleton tracking capabilities to drive a puppet with your body gestures.
  • Chapter 7: The Arduino Nano and the XBee wireless module will be introduced in this chapter. You will also learn all about resistors and color LEDs. You will take the skeleton tracking to three dimensions and use it to control a series of lamps responding to your presence.
  • Chapter 8: Przemek Jaworski has contributed this amazing drawing arm project. In this chapter, you will work with Firmata, a library that allows you to control the Arduino from Processing without the need to write any Arduino code. You will also learn how to build a tangible table to control your robotic arm.
  • Chapter 9: You will be introduced to DC motors and how to control them using H-bridges. You will also learn how to use proximity sensors. You will use all these techniques to control a RC car with hand gestures.
  • Chapter 10: This project will teach you how to hack a bathroom scale to provide user weight data wirelessly. You will learn how to acquire data from a seven- segment LCD display, and you will then combine the data with the Kinect skeleton tracking to implement user recognition and body mass index calculation.
  • Chapter 11: You will build a wireless, wearable circuit on a glove using the Arduino LilyPad, flex sensors, and an XBee module. You will then implement your own simple computer-assisted design (CAD) software, and you will use your wireless interface to draw 3D geometries by moving your hand in space.
  • Chapter 12: This chapter will teach you to parse, transform, and recompose raw point clouds in order to perform 360-degreee scans of objects using just one Kinect and a turntable that you will build. Then you will learn how to write your own .ply file export routine and how to import the point data into Meshlab to prepare it to be 3D printed or rendered.
  • Chapter 13: This final project will teach you the basics of inverse kinematics and how to use all the techniques from throughout the book to build a Kinect-controlled delta robot.

This book has been intentionally built upon multi-platform, open source initiatives. All the tools utilized in the book are free and available for Mac OSX, Windows, and Linux on commercial licenses.

Because of the three-dimensional nature of the data that you can acquire with the Kinect, some of the more advanced projects rely on the use of trigonometry and vector math. We have tried to cover the necessary principles and definitions, but if your mathematical skills are somewhat rusty, you might want to consider having a reference book at hand. John Vince’s Mathematics for Computer Graphics (Springer, 2006) is an amazing resource. Web sites like Wolfram Alpha (www.wolframalpha.com) or mathWorld (http://mathworld.wolfram.com) can be helpful as well.

Every chapter will include the necessary code to make the project work. You can copy this code from the book or you can download the necessary files from Apress (www.apress.com) or the book’s web site (www.arduinoandkinectprojects.com).

If you need to contact the authors, you can find us via the following addresses:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset