Raspberry Pi Sensors
eBook - ePub

Raspberry Pi Sensors

Rushi Gajjar

Condividi libro
  1. 192 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Raspberry Pi Sensors

Rushi Gajjar

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Raspberry Pi Sensors è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Raspberry Pi Sensors di Rushi Gajjar in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Computer Engineering. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
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...

Indice dei contenuti