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

Chapter 2. Working with Sensors

A sensor is a device that can detect changes or events and provide a corresponding output. The output is usually an electronic signal, for example, a light dependent resistor (LDR) outputs a voltage, which depends on the level of light cast on the sensors. When working with electronics, sensors are often divided into analog and digital sensors. Digital sensors can only detect two states, either on or off. The digital sensor can only distinguish if there is voltage going into the sensor or not. In code, this transfers into a 1 for voltage coming in and 0 if there is no voltage present. This is why they are called digital sensors, since they only operate in 0s and 1s. This means that these sensors only have two states, either on or off. A button, for example, is a digital sensor, which can only sense two states, if the button is pushed or not.

Analog sensors, however, can sense a range of values. The LDR, for example, is an analog sensor that changes...

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