Index

A

AddLine() function, 303

AddPoint() function, 298, 303

AddShape() function, 304

Arduino

Arduino Uno, 1, 2

breadboard, 61

circuit diagram

description, 18

electronic symbols, 20

fritzing, 1819

communication protocol

Kinect-controlled LEDs, 6971

serial-controlled LEDs, 6769

description, 2

electricity

AC/DC, 21

Joule’s law, 21

Ohms Law, 21

feedback

fritzing, 73

loop, 74

NITE callbacks, 76

photocell circuit, 72

serialEvent() method, 7576

setup() function, 74

hand tracking, 71

hardware

analog input pins, 7

boards, 6

digital pins, 7

input and output pins, 78

prototyping shield, 9

pull-up resistors, 8

shields, 9

XBee shield, 9

history of, 2

IDE

Arduino Development Environment, 1011

description, 10

serial monitor, 1112

installation

Linux, 3

Mac OS X, 23

Windows, 3

Kinect (see Kinect)

language

description, 12

fundamental data types, 13

loop() function, 13

setup() function, 12

variable declaration and initialization, 1314

variable scope, 1415

LED circuit, 66

parts, 62

processing sketch, 67

project

breadboard, 1516

circuit building, 1617

loop() function, 18

programming, 1718

setup() function, 17

serial communication

description, 62

PWM, 65

PWM-controlled LED, 6567

serial-controlled LED, 6365

Simple-OpenNI object, 6971

structure, 1

testing

blink, 5

board selection, 34

serial port, 4

Arduino code, 290291

checkSerial() function, 324

forward and backward pulses, 322

goTo(targetAngle), 323

loop() function, 323

potentiometer range, 322

processing code, 324

coordinate system transformations, 332

360-degree scan, 335

drawBoundingBox() function, 330

draw() function, 328

drawObjects() function, 329

drawPointCloud() function, 328

exportPly function, 335

full-color model, 325

keyPressed() function, 334

moveTable(float angle) function, 333

scan() function, 330

scanning process, 330

scanning space, 325

serialEvent() function, 333

setup() function, 327

turnTableAngle, 331

updateObject() function, 331, 333

variable declaration, 326327

vecRotY() function, 332, 333

servo integers, 321

updateServo() function, 324

Arduino LilyPad Simple board, 282

Arduino Nano, 135

Arduino programming

lampNumber, 149

loop() function, 149

setup() function, 149

Arduino serial sender, 287

ASUS Xtion PRO, 3334

B

BeginShape() function, 298

Biometric recognition

CSV file, 270

draw() function, 265

getDate() function, 266

graphic output, 275276

imports and variable declaration, 261262

newUser() function, 266267

reading and drawing the chart, 273275

serialEvent() function, 276

setup() function, 262263

Simple-OpenNI callbacks, 276277

updateUserData() function, 267268

updateUserHeight() function, 268270

user interface, 263265

user recognition, 270

vector subtraction, 271273

Biometric station

acquiring LCD signal, 249250

reading LCD signal, 250254

sending signal to processing, 254256

biometric recognition

CSV file, 270

draw() function, 265

getDate() function, 266

graphic output, 275276

imports and variable declaration, 261262

newUser() function, 266267

reading and drawing the chart, 273275

serialEvent() function, 276

setup() function, 262263

Simple-OpenNI callbacks, 276277

updateUserData() function, 267268

updateUserHeight() function, 268270

user interface, 263265

user recognition, 270273

components, 244

decoding LCD signal, 256259

hacking bathroom scale, 244245

hacking LCD, 246248

seven-segment LCD, 245246

using weight data, 259261

C

CAD. See Computer-aided design (CAD)

CalibrateFinger() function, 295

Callback functions

keyPressed() function, 305

serialEvent() function, 305

Simple-OpenNI callback functions, 306307

Car() function, 220

Computer-aided design (CAD), 296

ControlCar() function, 236

CSV file, 270

D

Delta robot

base

assembled base, 349

L-bracket, 349

shape, 348

circuit

board finished, 359

cable tidy, 355

diagram, 357

materials, 358

paperclip trick, 360

power supply, 360

servos headers, 358

strip board, 358

definition, 345

deltaLeg class

draw() function, 370

getWorldCoordinates() function, 369

moveTo function, 369

variables, 368

vecRotY() and vecRotZ(), 369

DeltaRobot class

array, 364

base and effector, 364

constructor, 364

diagram, 363

drawEffector() function, 366

draw() method, 366

effector and gripper simulation, 366368

initialization, 365

moveTo() method, 365

two distant cousins, 363

updateGrip() method, 368

variable, 363

effector, 350

gripper

assemble, 352

motor assembled, 352

parts, 350

servo and LEDs, 353

inverse kinematics

2D and 3D structure, 361

forward kinematics, 361

triangle theory, 362

legs

aluminum rod and ball, 346

articulation, 347

ball joint, 347

servo motors, 345

thigh connection, 346

mouse

driven robot simulation, 372

Import OpenGL, 371

orbit loop, 371

robot hanging

cantilevered MDF board, 353

setup, 355

Depth map

access, 4445

Kinect, 28

Display functions

drawData() function, 295

draw() function, 294

point() function, 295

switch() statement, 294

DisplayArray() function, 259

Distance sensor. See Proximity sensors

DrawArrow() function, 238

DrawCircle() function, 237

DrawClosestPoint() function, 304

DrawData() function, 295

Draw() function, 218220, 235236, 259, 265, 294, 297, 301302

DrawHand() function, 237

DrawVector() function, 220

E

Electrical motors, 208210

Enable/disable functions, 224

EndShape() function, 298

F

Finger-bending test, 289

Flex sensors, 283284

FTDI Basic Breakout, 282

G

Gears connections

aluminum angle, 318

base assemble, 316

base element, 317

disc and gear assemble, 317

Parallax servo, 314, 315

potentiometer, 314, 315

swivel, 317

turntable assemble, 319

Geometric classes

Line class, 298

Point class, 296297

Shape class, 298299

GetCalibration() function, 296

GetDate() function, 266

GetNumber() function, 258

Glove data receiver, 287289

Glove interface, 279

GloveInterface class, 292

calibrating the interface, 295296

display functions, 294295

setter functions, 293294

H

Hand tracking, 5758

Kinect, 28

connection to Arduino, 97

draw loop, 9397

libraries and setup, 8991

NITE callbacks, 9193

H-Bridge, 208210

I, J

IDE. See Integrated development environment (IDE)

Imports and fields, 299300

Imports and variable declaration, 261262

Integrated development environment (IDE)

Arduino Development Environment, 1011

description, 10

processing, 37

serial monitor, 1112

IR sensor. See Proximity sensors

K

KeyPressed() function, 305

Kinect

AC adapter, standard USB connection, 24

ASUS Xtion PRO, 3334

capabilities

depth map, 28

hand and skeleton tracking, 28

IR image, 28

RGB image, 27

description, 23

device, 23

drivers and frameworks

libfreenect drivers, 28

Microsoft Kinect SDK, 3031

NITE, 30

OpenNI, 2930

hand tracking, 5758

history of

hacking, 25

official frameworks, 25

Project Natal, 25

Kinect-controlled LEDs, 6971

networked puppet

angle calculation, 121123

circuit building, 108113

client applet, 127130

final Arduino code, 130132

network communication, 124125

parts, 100

puppet building, 105108

server applet, 125126

servos, 100103, 113118

skeleton tracking, 118120

stages, 103105

updateAngles() function, 122

web puppet, 99

PrimeSense, 2930

processing

libraries, 41

space, 5255

purchase, 24

RC interface, 232234

controlCar() function, 236

draw function, 235236

drawArrow() function, 238

drawCircle() function, 237

drawHand() function, 237

sendSerialData() function, 238, 239

setup() function, 234235

textDisplay() function, 238

remote control

circuit testing, 8688

connection to Arduino, 8086

hacking, 78

hand tracking (see Hand tracking)

parts, 7778

prototype shield assemble, 8386

robot (see Robot, Kinect)

sensor

features, 26

hardware, 2627

positioning, 27

structured-light 3D scanning technique, 26

theory

light coding image to depth map conversion, 33

structured-light 3D scanning, 3132

see also Remote-controlled vehicles

Kinect-controlled delta robot

Arduino code

C function word(), 382

in action, 383

integers and variables, 381

serial port output, 382

servo range, 383

boolean variable, 373

components and materials, 344

data sending

bitwise operations, 380

debugging, 381

grip rotation, 381

MSB and LSB, 380

sendSerialData() function, 380

displayText function, 377

draw() loop, 376

gripper

drawHand() function, 379

gizmo, 379

gripWidth and gripRot, 379

hand width tracking, 377

handVec position, 377

tilt tracking, 378

updateHand(), 378

hand gestures, 373

handOrigin PVector, 375

kinematics, 343

Motive Colloquies, 344

setup() function, 374

simulation and physical robot, 343

XvN Point Control callback function, 375

L

Lamp class, 150

description, 150

OOP

class declaration, 151

classes and objects, 150

constructor, 152

description, 150

field description, 151

methods, 152154

new tab creation, 151

Language processing, 36

LED

communication protocol

Kinect-controlled, 6971

serial-controlled, 6769

serial communication

PWM-controlled, 6567

serial-controlled, 6365

LilyPad XBee breakout board, 289290

Line class, 298

Line() function, 298

Loop() function, 222223, 229230

M

Meshlab, Turntable scanner. See Point cloud; Surface reconstruction

Mood lamps

Arduino Nano, 135

Arduino programming, 149150

circuit building

battery clip, 145

breakout headers, 139

components, 138

lamp circuit, 137

resistor color codes, 140142

resistors, 139

RGB lamp test, 144

scratched strip board, 138

testing, 142145

XBee and battery clip, 144

lamp class

description, 150

OOP, 150154

LEDs, 141142

parts, 134

resistors soldered, 140141

RGB

color space, 134135

lamp, 133

lamp color change, 165

user control sketch, 154

data storage and retrieval, 160161

description, 154

display functions, 161163

draw() function, 155156

serial communication, 161

setup() function, 154

Simple-OpenNI callbacks, 163164

userControl() function, 157160

variable declaration, 154

XBee wireless module

description, 145

explorer connected to Arduino, 146

final circuit, 148

pencil holder, 148

strip board, with serial connections, 147

Move functions, 224, 230

MovePoint() function, 303

N

Network communication

description, 124

internet, 125

local network, 124125

Networked puppet, Kinect

angle calculation, 121123

applet

client, 127130

server, 125126

circuit building

Arduino board, 110

circuit diagram, 108, 109

components, 108, 109

headers, 110

power and ground, 111

scratched strip board, 111

strip board, 111113

drawLimb() function, 129130

final Arduino code, 130132

network communication

description, 124

internet, 125

local network, 124125

shared canvas, 124

parts, 100

puppet

arm/legs assembled, 107

final stage, 107, 108, 117, 118

pieces, 106

servo angles, 116

servos, 106

sendSerialData() function, 130

servos

control technique, 103

object, 101

Servo.attach() function, 101103

starting position setting, 115118

testing, 113115

wave form, 100, 101

skeleton tracking

description, 118

drawSkeleton() function, 119

Simple-OpenNI events, 11920

stages

assembled stage, 104

parts, 103, 104

puppet rotation servo, 104105

updateAngles() function, 122

web puppet, 99

NewUser() function, 266267

NITE callbacks, 9193

NITE functions

description, 56

skeleton tracking, 5860

O

Object-oriented programming (OOP)

accessor methods, 152

lamp class

class declaration, 151

classes and objects, 150

constructor, 152

description, 150

field description, 151

methods, 15254

new tab creation, 151

OnPointCreate() function, 306

OnPointUpdate() function, 306

P, Q

Point class, 296297

Point cloud, 5556

Point() function, 295

PrimeSense

description, 29

NITE, 30

OpenNI, 2930

PS1080 system, 33

Processing

Arduino IDE, 35

depth map access, 4445

features of, 36

IDE, 37

installation, 36

Kinect

libraries, 41

space, 5255

language, 36

libraries, 4041

linear and two-dimensional arrays, 54

NITE functions

description, 56

hand tracking, 5758

skeleton tracking, 5860

point cloud, 5556

RGB image access, 4445

Simple-OpenNI

description, 41

Linux installation, 4344

Mac OS X installation, 4243

Windows installation, 42

sketch

description, 38

draw() function, 3940

setup() function, 38

structure, 3840

variables, 38

three-dimensional (3D)

camera control libraries, 50

cube, 47

description, 46

KinectOrbit, 5051

matrix transforms, 4749

Proximity sensors, 224229

loop() function, 229230

move functions, 230

setup() function, 229

Pulse width modulation (PWM)

description, 65

PWM-controlled LED, 6567

R

ReadChart() function, 265

Remote control, Kinect

channel gestures, 95

checkSpeed() function, 94

circuit testing, 8688

connecting to Arduino

breadboard, 81

prototype shield assembling, 8386

relay circuit, 82

switch testing, 8081

description, 77

drawHand function, 96

fTimes parameter, 92

hacking, 78

hand tracking and gesture recognition

connection to Arduino, 97

draw loop, 9397

libraries and setup, 8991

NITE callbacks, 9193

parts, 7778

prototype shield

breakaway headers, 8485

connections, 86

front and rear image, 8384

relays, 84

XnVPointControl, 92

Remote-controlled vehicles

building the circuit, 212216

components, 208

driving vehicle, 240

electrical motors and H-Bridge, 208210

hacking a car, 210212

Kinect RC interface, 232234

controlCar() function, 236

draw function, 235236

drawArrow() function, 238

drawCircle() function, 237

drawHand() function, 237

sendSerialData() function, 238, 239

setup() function, 234235

textDisplay() function, 238

proximity sensors, 224229

loop() function, 229230

move functions, 230

setup() function, 229

testing the circuit

car() function, 220

draw() function, 218220

drawVector() function, 220

enable/disable functions, 224

loop function, 222223

move functions, 224

sendSerial() function, 221

setup() function, 218, 222

turning functions, 223

XBee Explorer for wireless communication, 230232

RGB color model

applications, 135

chart, 134135

description, 134

RGB image access, 4445

RGB lamp, 133

Robot, Kinect

circuit building, 175176

circuit testing

Arduino library, 176

servo test, 176177

construction

arm, 170

assembled robot, 175

base assembly, 174175

part 1 assembly, 170171

part 2 assembly, 171172

part 3 assembly, 172173

in action

at work, 205

description, 204

patterns, 205

installation visual, 167

parts, 168169

physical robot, 183185

point cloud

calibration, 187188

filtering, 194195

rotation, 189193

simulation

angle measuring program, 179180

angles, 178

simulation program, 180183

span, 178

working area, 179

tangible table interface

calibrated point cloud, 193

finger position, 195198

point cloud, 187195

rotation equations, 188

setup, 186

uncalibrated point cloud, 187

virtual robot model

description, 198

draw() function method, 200201

input polishing, 201203

pointer projection, 200

work area, 201

S

SaveCalibration() function, 295

SendSerial() function, 221

SendSerialData() function, 238, 239

Serial communication

description, 62

PWM, 65

PWM-controlled LED, 6567

serial-controlled LED, 6365

SerialEvent() function, 260, 276, 305

SetFingerValues() function, 293

SetPosition() function, 294

SetState() function, 258

Setter functions

setFingerValues(), 293

setPosition(), 294

setZeroPos(), 294

Setup() function, 218, 222, 234235, 262263, 300301

SetZeroPos() function, 294

Shape class, 298299

Simple-OpenNI

callbacks, 276277

onPointCreate() function, 306

onPointUpdate() function, 306

description, 41

installation

Linux, 43

Mac OS X, 4243

Windows, 42

Skeleton tracking, 5860, 118

description, 118

drawSkeleton() function, 119

Kinect, 28

Simple-OpenNI events, 119120

SoftwareSerial library, 290

SparkFun Arduino prototype shield, 319321

Structured-light 3D scanning technique

depth map, 32

IR coding image, 32

triangulation principles, 31

Surface reconstruction

blender, 342

color transfer and vertex geometry, 341

delete points, 339

3D triangular meshes, 338

mesh generation, 340

point cloud, 338

vertex colors transfer, 341

Switch() statement, 294

T

Tangible table interface

calibrated point cloud, 193

finger position, 195198

point cloud, 187195

rotation equations, 188

setup, 186

uncalibrated point cloud, 187

TextDisplay() function, 238

Third dimensional (3D) modeling interface

Arduino LilyPad, 282

components, 280, 281

connecting the circuit, 284286

flex sensors, 283284

geometric classes

Line class, 298

Point class, 296297

Shape class, 298299

glove interface, 279

GloveInterface class, implementation

calibrating the interface, 295296

display functions, 294295

setter functions, 293294

main program

addLine() function, 303

addPoint() function, 303

addShape() function, 304

drawClosestPoint() function, 304

draw function, 301302

imports and fields, 299300

movePoint() function, 303

processing callback functions, 305

setup function, 300301

Simple-OpenNI callback functions, 306307

unSelectAll() function, 303, 304

testing the circuit

Arduino serial sender, 287

processing glove data receiver, 287289

wireless communication

Arduino code, 290291

LilyPad XBee breakout board, 289290

SoftwareSerial library, 290

Third dimensional (3D) processing, 46

camera control libraries, 50

cube, 47

description, 46

KinectOrbit, 5051

matrix transforms, 4749

Tracking

hand, 5758, 89

connection to Arduino, 97

draw loop, 9397

libraries and setup, 8991

NITE callbacks, 9193

Kinect

hand, 28

skeleton, 28

skeleton, 5860, 118

description, 118

drawSkeleton() function, 119

Simple-OpenNI events, 119120

Turning functions, 223

Turntable scanner

assembled system, 309

building

gears connections, 314319

parts, 313

prototype, 313

circuit, 319321

point cloud

exportPly function, 337

ply and obj extension, 335

surface reconstruction

blender, 342

color transfer and vertex geometry, 341

delete points, 339

3D triangular meshes, 338

mesh generation, 340

point cloud, 338

vertex colors transfer, 341

theory

diagram, 311

Kinect cameras, 310

Meshlab, 310

reconstruction, 311

requirements, 312

SLAM and RANSAC-based reconstruction, 310

SpinScan, 310

trigonometry, 311

see also Arduino code

U

UnSelectAll() function, 303, 304

UpdateUserData() function, 267268

UpdateUserHeight() function, 268270

User control sketch, mood lamps

data storage and retrieval, 160161

description, 154

display functions, 161163

draw() function, 155156

serial communication, 161

setup() function, 154

Simple-OpenNI callbacks, 163164

userControl() function

lamp control, 157159

lamp creation, 159160

variable declaration, 154

User interface, 263265. See also Third dimensional (3D) modeling interface

User recognition, 270

vector subtraction, 271273

V

Vertex() function, 298

Virtual robot model

description, 198

draw() function method, 200201

input polishing, 201203

pointer projection, 200

work area, 201

Voltage divider, 283

W

Wireless interface

Arduino code, 290291

LilyPad XBee breakout board, 289290

SoftwareSerial library, 290

X, Y, Z

XBee Explorer for wireless communication, 230232

XBee Explorer USB, 289

XBee wireless module

description, 145

explorer connected to Arduino, 146

final circuit, 148

pencil holder, 148

strip board, with serial connections, 147

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

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