Raspberry Pi Sensors
eBook - ePub

Raspberry Pi Sensors

Rushi Gajjar

Compartir libro
  1. 192 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Raspberry Pi Sensors

Rushi Gajjar

Detalles del libro
Vista previa del libro
Índice
Citas

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Raspberry Pi Sensors un PDF/ePUB en línea?
Sí, puedes acceder a Raspberry Pi Sensors de Rushi Gajjar en formato PDF o ePUB, así como a otros libros populares de Computer Science y Computer Engineering. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
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...

Índice