top of page
Search

IOT lesson 1-temperature and humidity sensor.

  • sreeramchittayil
  • Jun 11, 2023
  • 1 min read

The goal of this project, which took two lessons to finish, is to detect and tell us of the temperature and humidity of our surroundings. It makes use of a DHT component to accomplish this. The temperature will be displayed on the serial monitor once this component is attached and is operating according to the correct code. The ability and exact information that this project can give you are some of its advantages. Even the decimal, which adds to its high level of dependability.

the code is as follows:

#include<dht.h>

dht DHT;

void setup() {

Serial.begin (9600);

Serial.println("weather monitoring");


}


void loop() {

Serial.println("\n");

int tempdata = DHT.read11(5);

Serial.print("Temperature = ");

Serial.print(DHT.temperature);

Serial.println("\t");

Serial.print("Humadity = ");

Serial.print(DHT.humidity);

delay(2000);

}




 
 
 

Comments


bottom of page