Raspberry Pi Sensors
eBook - ePub

Raspberry Pi Sensors

Rushi Gajjar

Partager le livre
  1. 192 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Raspberry Pi Sensors

Rushi Gajjar

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Raspberry Pi Sensors est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Raspberry Pi Sensors par Rushi Gajjar en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Computer Engineering. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2015
ISBN
9781784393618

Raspberry Pi Sensors


Table of Contents

Raspberry Pi Sensors
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Meeting Your Buddy – the Raspberry Pi
A glance at the Raspberry Pi board
Setting up for the first time
Installing the operating system
Purchasing your SD card
Downloading the required software
Windows
Mac OS X
Linux
Expanding the root filesystem
Logging in to the RasPi
Opening the desktop
Connecting the Raspberry Pi to the Internet
Internet connection through Wi-Fi dongle
Internet connection through Ethernet from a PC
Editing the command-line file of the RasPi
Turning on the RasPi
Changing cmdline.txt again to add the PC's Ethernet port IP address
Sharing the Internet connection between your PC and an Ethernet connection
Installing and opening the free SSH client on your PC
A crash course on Linux
The terminal and shell
Useful and frequently used Linux commands
Installing useful libraries
git-core
wiringPi
python-gpio
Be ready with Python and C
Writing and executing the Python program
Writing and executing the C program
Practice makes you perfect
Summary
2. Meeting the World of Electronics
Basic terminologies of electronics
Voltage
Current
Resistor
Capacitor
Open circuit and short circuit
Series and parallel connections
Pull-up and pull-down resistors
Communication protocols
UART
Serial Peripheral Interface
Inter-Integrated Circuit
Useful tips and precautions
Understanding the GPIO port
It's time to glow LEDs!
Shell script and GPIO
LED blink and Python
Let's blink the LED with C code
Summary
3. Measuring Distance Using Ultrasonic Sensors
The mysterious ultrasonic sensor
Distance calculation
Building the project!
Hardware setup
Software setup
Initial configuration
Setting the GPIO pins on the default mode
Sending and receiving the pulses
Calculation of distance
Fixing common problems
Is it showing the distance incorrectly?
Is the module not responding?
Are you measuring the distance less than 2 cm?
A wearable device for the visually impaired
Building the hardware
Software setup
Summary
4. Monitoring the Atmosphere Using Sensors
Sensor selection process
Criticality of an application
Selecting a sensor package
Sensor properties
Purchasing the sensor
Available sensors
InsideDHT – temperature and humidity sensors
Introducing the photoresistor (photocell)
Building the project
Hardware setup
Breadboard setup
Preparing the code
Code the DHT sensor and measure relative humidity and temperature
Code the LDR sensor and measure light variations
Putting all the parts together
Troubleshooting common problems
Received DHT data is not valid
The LDR sensor gives a zero value
Is the voltage correct?
Summary
5. Using an ADC to Interface any Analog Sensor with the Raspberry Pi
Analog-to-digital convertors
Data reception and signal conditioning
Amplification
Sampling and quantization
Types of ADC
Resolution of the ADC
The math behind ADC
Data output
MCP3008 for analog-to-digital conversion
Channels
Ground
SPI
Reference voltage
Supply voltage
Making your own sensor station
Generic software preparation
Using your sensor station – make a temperature logger
Know the LM36 temperature sensor
Write the application
Summary
6. Uploading Data Online – Spreadsheets, Mobile, and E-mails
Internet of Things
Sensor nodes
Communication
The cloud
Data analytics
Security concerns
Hardware setup
Synchronizing the clock with the Internet
Uploading data on Google spreadsheets
Live feed on mobile phones
Getting notified by e-mails
Integrating everything
Common problems faced
Summary
7. Creating an Image Sensor Using a Camera and OpenCV
Image processing
OpenCV
Camera interfacing with the RasPi
The RasPi camera modules
USB webcam
Live streaming using a network camera
Porting OpenCV
Testing
Create a motion detector
Preparing shell to compile OpenCV and wiringPi
Amazing projects for you
Summary
A. Shopping List
Basic requirements
Sensors
Integrated chips
Components
Others
Index

Raspberry Pi Sensors

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: April 2015
Production reference: 1240415
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-361-8
www.packtpub.com
Cover image by Rushi Gajjar

Credits

Author
Rushi Gajjar
Reviewers
David Alcoba
Siddharth Bhave
CĂ©dric Verstraeten
Commissioning Editor
Amarabha Banerjee
Acquisition Editor
Owen Roberts
Content Development Editor
Natasha Dsouza
Technical Editors
Tanmayee Patil
Shiny Poojary
Sebastian Rodrigues
Copy Editors
Karuna Narayanan
Vikrant Phadke
Project Coordinator
Rashi Khivansara
Proofreaders
Simran Bhogal
Safis Editing
Clyde Jenkins
Indexer
Rekha Nair
Graphics
Sheetal Aute
Disha Haria
Production Coordinator
Shantanu N. Zagade
Cover Work
Shantanu N. Zagade

About the Author

Rushi Gajjar is an embedded systems hardware developer and a lifetime electronics enthusiast. He works in the field of research and development of high-speed single-board embedded computers and wireless sensor nodes for the Internet of Things. Apart from that, he studied MTech in embedded systems by being involved in research at VIT University, Vellore.
Prior to this, his extensive work as a freelancer in the domain of electronics hardware design introduced him to rapid prototyping development boards such as the Raspberry Pi. In his spare time, he loves to develop projects on Raspberry Pi that include vision, data logging, web servers, and machine learning automation systems. He loves to teach Raspberry Pi projects to school students.
His vision encompasses connecting every entity in the world to the Internet to enhance the human living experience. His hobbies include playing the tabla, photography, and travelling.

Acknowledgements

First of all, I must say thanks to my acquisition edito...

Table des matiĂšres