connect@howdiyworld.com
|

Ambient Temperature

What is Needed?

Humidity Sensor (DHT11)
Blynk App
Jumpers
HowDIY

BLOCK DIAGRAM

Procedure

  1. Setting up Blynk App
  2. Humidity Sensor (DHT11)
  3. Connections
  4. Program
  5. Output

Procedure

Download Blink App

  1. Sign in and add new device (Raspberry Pi 3) in Blynk App.
  2. An Authentication code will be sent to your mail
  3. Check the Authentication code and replace it in the Python Code.

Create a Value Display

  1. Click the + Button
  2. Select Value Display
  3. A Value Display is created to edit it’s properties click the created Display
  4. Now in the Value Display settings click the PIN Button
  5. In the Select PIN pop-up, Select Virtual and V3 for Humidity Value
  6. As the same procedure create another Value Display for Temperature Value in Virtual and V2
  7. You can change the Name and output should be 0 and 1023

Humidity Sensor

The humidity sensing component of the DHT11 is a moisture holding substrate with the electrodes applied to the surface. … The DHT11 converts the resistance measurement to relative humidity on a chip mounted to the back of the unit and transmits the humidity and temperature readings directly to the Raspberry Pi.

Connections

  • Connect Humidity Sensor’s VCC to 2nd
  • Connect Humidity Sensor’s GND to 6th
  • Connect Humidity Sensor’s OUT to 7th

Python Program

from gpiozero import LED, Button, Buzzer
import blynklib
import Adafruit_DHT

BLYNK_AUTH = ‘Enter_Your_AUTH’

# Initialize Blynk
blynk = blynklib.Blynk(BLYNK_AUTH)

# Register Virtual Pins
@blynk.handle_event(‘read V22’)

def my_user_task():
humidity, temperature = Adafruit_DHT.read_retry(11, 4)
print (‘Temp: {0:0.1f} C Humidity: {1:0.1f} %’.format(temperature, humidity))
#print(‘Humidity = {:.2f}%tTemperature = {:.2f}C’.format(humidity, temperature))
blynk.virtual_write(2, ‘{:.2f}’.format(temperature))
blynk.virtual_write(3, ‘{:.2f}’.format(humidity))

try:
while True:
blynk.run()
my_user_task()

except KeyboardInterrupt:
sys.exit(0)

Output

Ambient Temperature Monitoring – The Temperature and Humidity values will be updated on your mobile application (Output Visible in Mobile VIA Application)

Social media & sharing icons powered by UltimatelySocial
Facebook
Twitter
YouTube
LinkedIn
Instagram