articles

GrovePi Project 3: Temperature/ Humidity Alarm Sensor With Light Warning

Tuesday, September 13, 2016

For Project 3 of the GrovePi+, I am creating a digital high temperature/humidity alarm sensor with light warning using a GrovePi+ board, Raspberry Pi, an RGB LCD, humidity/temperature sensor, buzzer and two LEDs.
To make the high temperature/ humidity alarm sensor with light warning , I am tweaking the digital distance sensor from Project 2 by replacing the ultrasonic ranger with the humidity/temperature sensor and leaving everything else the same. As far as the code, it is pretty much the same as the digital distance sensor code with some minor adjustments.

Instead of printing distance, we are printing temperature/ humidity so we write
[temp,hum]=dht (dht_sensor-port,dht_sensor_type)
print ("temp =", temp,  "C\thumidity =", hum, "%")
t=str(temp)
h=str(hum)

The digital high temperature sensor is set to turn the blue LED on when the temperature is less than 20 degrees centigrade. When the temperature becomes greater or equal than 20 degrees centigrade, the red LED turns on instead and the buzzer will buzz.

In the video below, I set the temperature alarm triggering at 25 degrees centigrade. I use a blow dryer to set off the alarm

If instead of temperature you want to measure high humidity, simply replace if temp with if hum from the code below:


Similar Gadget Explained Reviews

0 comments

Connect With Gadget Explained