Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
akk47
Published © MPL-2.0

Weather station 1

Have you ever thought how your phone gets temperature, humidity, UV index they get this info from servers online, what if we make...

IntermediateFull instructions provided359
Weather station 1

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
DHT11 Temperature & Humidity Sensor (3 pins)
DHT11 Temperature & Humidity Sensor (3 pins)
×1
Alphanumeric LCD, 16 x 2
Alphanumeric LCD, 16 x 2
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Rotary potentiometer (generic)
Rotary potentiometer (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE
GE fritzing

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free
Solder Flux, Soldering
Solder Flux, Soldering

Story

Read more

Schematics

schematics

Code

code for weather station 1

C/C++
#include <LiquidCrystal.h>
#include <SimpleDHT.h>
LiquidCrystal lcd(12,11,5,4,3,2);
SimpleDHT11 dht11;

const int DHT11pin=7;
int tmp;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  lcd.begin(16,2);

}

void loop() {
  // put your main code here, to run repeatedly:
  byte temperature;
  byte humidity;
  
  tmp=dht11.read(DHT11pin,&temperature,&humidity,NULL);
  Serial.print((int)temperature);
  Serial.print("*C, ");
  Serial.print((int)humidity);
  Serial.println("% .");

  lcd.setCursor(0,0);
  lcd.print("Temperature- ");
  lcd.print((int)temperature);
  lcd.print("C");

  lcd.setCursor(0,1);
  lcd.print("Humidity- ");
  lcd.print((int)humidity);
  lcd.print("%");

  delay(60000);

}

Credits

akk47
7 projects • 9 followers
Contact

Comments

Please log in or sign up to comment.