Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Learning IoT with Particle Photon and Electron

You're reading from   Learning IoT with Particle Photon and Electron Develop applications on one of the most popular platforms for IoT using Particle Photon and Electron with this fast-paced guide

Arrow left icon
Product type Paperback
Published in Sep 2016
Publisher
ISBN-13 9781785885297
Length 136 pages
Edition 1st Edition
Arrow right icon
Authors (2):
Arrow left icon
Kajari Ghoshdastidar Kajari Ghoshdastidar
Author Profile Icon Kajari Ghoshdastidar
Kajari Ghoshdastidar
Ajith Vasudevan Ajith Vasudevan
Author Profile Icon Ajith Vasudevan
Ajith Vasudevan
Arrow right icon
View More author details
Toc

Moving the car with gestures


It would be interesting to be able to move the model car with hand gestures. In this section, we explore the possibilities of the same. An additional piece of hardware is needed to track hand movements or gestures and convert them to events that our code can use. We can use a Leap Motion (https://www.leapmotion.com/) controller for this purpose. The Leap Motion controller uses two monochromatic infrared cameras and three infrared LEDs. The device can track up to 10 fingers in real time, and transmit the data to a computer using USB.

The following image shows a Leap Motion controller in use:

Figure 10: Leap Motion controller

How it works

We use the spherical radius of palm output parameter of the Leap Motion controller as the input which drives the model car. We do this by continuously monitoring the spherical radius value as seen by the controller. When the palm of your hand is stretched, that is, the spherical radius is large, the car starts moving, and when the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime