Book Image

Raspberry Pi Sensors

By : Rushi Gajjar
Book Image

Raspberry Pi Sensors

By: Rushi Gajjar

Overview of this book

Table of Contents (16 chapters)
Raspberry Pi Sensors
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
Index

Using your sensor station – make a temperature logger


Now that you know the trick of reading the ADC value from MCP3008 through an SPI, line we are ready to interface one of the sensors with MCP3008's channel 0. You can now use your sensor station to interface with up to eight sensors in parallel. To simplify the experiment, we are going to interface the temperature sensor with the sensor station board. Imagine that the RasPi has been connected at a remote place to log temperature data. Depending on our application, once in a month or after a certain time, we need the data to be recorded manually. To log this, we will make use of Python to store data in a text file, and read these values later on for analysis.

Know the LM36 temperature sensor

LM35 and LM36 (also known as TMP36) provide the linear response of temperature changes reflected on voltage. The change in output voltage of the sensor is directly proportional to the temperature change experienced by the temperature sensor. LM35 and...