Mini weather station table no.30

Bhagwan Pandurang Pandekar

Siddhesh dada

1.Anushka Kalyan Nannaware

2.Aabha Rishikesh Deshpande

3.Dnyanada Rahul Hande

Step1,We Create micro Weather Station by using LCD, Arduino,jumper wire, sensors like,DHT11,BMP180,LED, buzzer,9v battery,and breadboard and after connecting all these components we are applied the code on Arduino now we are going to complete the level 2

#include <Wire.h>

#include <LiquidCrystal_I2C.h>

#include <Adafruit_BMP085.h>

#include <DHT.h>

#define DHTPIN 2

#define DHTTYPE DHT11

#define LEDPIN 4

#define BUZZER 5

// Change 0x27 to 0x3F if needed

LiquidCrystal_I2C lcd(0x27, 16, 2);

DHT dht(DHTPIN, DHTTYPE);

Adafruit_BMP085 bmp;

float lastPressure = 0;

void setup() {

lcd.init();

lcd.backlight();

dht.begin();

bmp.begin();

pinMode(LEDPIN, OUTPUT);

pinMode(BUZZER, OUTPUT);

lcd.setCursor(0,0);

lcd.print(“Weather Station”);

delay(2000);

lcd.clear();

}

void loop() {

float temp = dht.readTemperature();

float hum = dht.readHumidity();

float pressure = bmp.readPressure()/100.0;

float altitude = bmp.readAltitude();

if (isnan(temp) || isnan(hum)) {

lcd.setCursor(0,0);

lcd.print("Sensor Error");

return;

}

// Heat Index

float heatIndex = dht.computeHeatIndex(temp, hum, false);

// Dew Point

float dewPoint = temp - ((100 - hum)/5);

// Weather Prediction

String weather;

if (pressure > 1015) weather = “Sunny”;

else if (pressure >= 1000) weather = “Normal”;

else weather = “Rainy”;

// Pressure Trend

String trend;

if (pressure > lastPressure) trend = “Rising”;

else if (pressure < lastPressure) trend = “Falling”;

else trend = “Stable”;

lastPressure = pressure;

lcd.clear();

lcd.setCursor(0,0);

lcd.print(“T:”);

lcd.print(temp);

lcd.print(" H:");

lcd.print(hum);

lcd.setCursor(0,1);

lcd.print(weather);

if(temp > 35){

digitalWrite(LEDPIN, HIGH);

digitalWrite(BUZZER, HIGH);

} else {

digitalWrite(LEDPIN, LOW);

digitalWrite(BUZZER, LOW);

}

delay(2000);

}

Now we are trying to complete level 2 and it was light hard but is was so many to learn

We use ESP -23 at the place of Arduino UNO In level 2 and also use thing speak software at the place of LCD screen

1 Like