Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Arduino Wearable Projects

You're reading from   Arduino Wearable Projects Design, code, and build exciting wearable projects using Arduino tools

Arrow left icon
Product type Paperback
Published in Aug 2015
Publisher
ISBN-13 9781785283307
Length 218 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Tony Effe A Olsson Tony Effe A Olsson
Author Profile Icon Tony Effe A Olsson
Tony Effe A Olsson
Arrow right icon
View More author details
Toc

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