0% found this document useful (0 votes)
30 views4 pages

Practical 2 IOT

iot practiacal

Uploaded by

hrushikeshj775
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views4 pages

Practical 2 IOT

iot practiacal

Uploaded by

hrushikeshj775
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

ASSIGNMENT No: 02

Aim: Understanding the connectivity of Raspberry-Pi circuit with temperature


sensor.

Title: Understanding the connectivity of Raspberry-Pi /Beagle board circuit with


temperature sensor. Write an application to read the environment temperature.
If temperature crosses a threshold value, generate alerts using LEDs.

Objective:

4. To understand the connectivity of Raspberry-Pi circuit with temperature

sensor

5. To Understanding how to read the environment temperature

6. To Understanding how to switch on the LED on crossing threshold

Theory:

Temperature sensor: DHT11

· The DHT11 temperature and humidity sensor is a nice little module that
provides digital temperature and humidity readings. It’s really easy to set up,
and only requires one wire for the data signal.

· These sensors are frequently used in remote weather stations, soil monitors,
and home environment control systems.

· The DHT11 contains a surface mounted NTC thermistor and a resistive


humidity sensor. An IC on the back of the module converts the resistance
measurements from the thermistor and humidity sensor into digital outputs of
degrees Celsius and Relative Humidity.
Fact sheet – DHT11

· Ultra low cost

· 3 to 5V power and I/O

· 2.5mA max current use during conversion (while requesting data)

· Good for 20–80% humidity readings with 5% accuracy

· Good for 0–50°C temperature readings ±2°C accuracy

· No more than 1 Hz sampling rate (once every second)

· Body size 15.5mm x 12mm x 5.5mm

· 4 pins with 0.1" spacing

There are two variants of the DHT11 you’re likely to come across. One is a four
pin stand-alone module, and the other is a three pin,PCB mounted module.
The pinout is different for each one, so connect the DHT11 according to which
one you have:
Programming the DHT11 in Python

We will be using the Adafruit DHT11 Python library. We can download the
library using Git,so if you don’t have Git installed on your Pi already, enter this
at the command prompt:

sudo apt-get install git-core

Install the Adafruit DHT11 library

1. Enter this at the command prompt to download the library:

git clone https://github.com/adafruit/Adafruit_Python_DHT.git

2. Change directories with:

cd Adafruit_Python_DHT

3. Enter this:

sudo apt-get install build-essential python-dev

4. Install the library with:

sudo python setup.py install

import Adafruit_DHT

while True:

hum, temp Adafruit_DHT.read_retry(11,4)

print "Temperature:", temp

print "Humidity:", hum


Create a circuit using Raspberry Pi, DHT11 and Buzzer. When the temperature
goes beyond

35 degrees, the LED will start glowing.

Question

 What type of temperature sensors are commonly used with Raspberry Pi,
and what are their operating principles?
 How can data obtained from the sensor be processed and visualized on
the Raspberry Pi?

Conclusion:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy