Grovepi Projection 3: Temperature/ Humidity Alert Sensor Alongside Low-Cal Warning

For Project iii of the GrovePi+, I am creating a digital high temperature/humidity alert sensor amongst low-cal warning using a GrovePi+ board, Raspberry Pi, an RGB LCD, humidity/temperature sensor, buzzer too 2 LEDs.
To brand the high temperature/ humidity alert sensor amongst low-cal warning , I am tweaking the digital distance sensor from Project 2 by replacing the ultrasonic ranger amongst the humidity/temperature sensor too leaving everything else the same. As far every bit the code, it is pretty much the same every bit the digital distance sensor code amongst to a greater extent than or less tyke adjustments.

Instead of printing distance, nosotros are printing temperature/ humidity too thence nosotros write
[temp,hum]=dht (dht_sensor-port,dht_sensor_type)
print ("temp =", temp,  "C\thumidity =", hum, "%")

The digital hotness sensor is gear upward to plow the bluish LED on when the temperature is less than twenty degrees centigrade. When the temperature becomes greater or equal than twenty degrees centigrade, the crimson LED turns on instead too the buzzer volition buzz.

In the video below, I gear upward the temperature alert triggering at 25 degrees centigrade. I purpose a blow dryer to gear upward off the alarm

If instead of temperature you lot desire to mensurate high humidity, merely supersede if temp with if hum from the code below: