Instead of printing distance, nosotros are printing temperature/ humidity too thence nosotros write
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: