Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arduino Wearable Projects

You're reading from  Arduino Wearable Projects

Product type Book
Published in Aug 2015
Publisher
ISBN-13 9781785283307
Pages 218 pages
Edition 1st Edition
Languages

Detecting gestures


In this next part, we will have a look at how to detect gestures with the accelerometer. For this project, we will not be using the gyro and compass. However, remember that even though this chapter will eventually end, it does not mean your projects have to. Once you are done, you can keep developing the project further and implementing the compass into the bike gloves, which may come in handy in the future.

First, let's take a look at how we can detect gestures. We will need three different interactions, the holding of the handlebar, indicating a turn, and stopping. We need to know that we are holding the handlebar, since this will act as our default state when the light should be off. In order to turn the white LEDs on, we need to know when the hand is lifted to indicate a turn, and we need to know when the hand is in a vertical position so we can turn on the red LEDs to indicate that we are stopping. Take a look at Chapter 2, Working with Sensors in order to connect...

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 $15.99/month. Cancel anytime}