Skip to Main Content
Making Things See
book

Making Things See

by Greg Borenstein
January 2012
Beginner to intermediate content levelBeginner to intermediate
440 pages
17h 11m
English
Make: Community
Content preview from Making Things See

Chapter 6

Complete Forward Kinematics Example

Example A-7 presents the complete Processing sketch for forward kinematics. It calculates both joint angles and then sends the results over serial to the Arduino.

Example A-7. forward_kinematics_serial.pde

import SimpleOpenNI.*; SimpleOpenNI kinect; // import the processing serial library import processing.serial.*; // and declare an object for our serial port Serial port; void setup() { size(640, 480); kinect = new SimpleOpenNI(this); kinect.enableDepth(); kinect.enableUser(SimpleOpenNI.SKEL_PROFILE_ALL); kinect.setMirror(true); // Get the name of the first serial port // where we assume the Arduino is connected. // If it doesn't work, examine the output of // the println, and replace 0 with the correct ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Reinventing the Organization for GenAI and LLMs

Reinventing the Organization for GenAI and LLMs

Ethan Mollick
Make: Volume 79

Make: Volume 79

Mike Senese
Making Things Smart

Making Things Smart

Gordon F. Williams

Publisher Resources

ISBN: 9781449321918Errata