narmathanandhu
Published

Arduino Weather Station

This project is used to find out temperature and humidity.

IntermediateProtip12,038
Arduino Weather Station

Things used in this project

Story

Read more

Code

Code

Arduino
Displaying temperature and humidity on an LCD
#include <dht.h>
#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

dht DHT;

#define DHT11_PIN 3

void setup(){
  lcd.begin(16, 2);
}

void loop(){
  int chk = DHT.read11(DHT11_PIN);
  lcd.setCursor(0,0); 
  lcd.print("Temp: ");
  lcd.print(DHT.temperature);
  lcd.print((char)223);
  lcd.print("C");
  lcd.setCursor(0,1);
  lcd.print("Humidity: ");
  lcd.print(DHT.humidity);
  lcd.print("%");
  delay(1000);
}

Credits

narmathanandhu

narmathanandhu

0 projects • 0 followers

Comments