School name:-Vidyanand bhavan high school
Teacher name:- Smita Bharat Kasar
Students name:-
1]Arnav Govind Nagaonkar
2]Vikram Ganesh Choudhary
3]Megha Vijay Gohel
Stage 1.
We are here to make micro weather station.
So we faced lot of problem. First problem was of circuit so we used chatgpt to solve this problem then after this we faced another problem of arduino ide and mentors helped us. And after all this hard work, our work paid off.
Our project micro weather station collects data like temperatures, humidity with the help of bmp 180 and measures atmospheric pressure with the help of dht 11. We have used breadboard and jumper wire to make circuit.
Components we Used and Their Functions
•Arduino Uno
The main controller (brain) of the project.
Reads data from sensors and controls the LCD, LED, and buzzer.
•DHT11 Sensor
Measures temperature and humidity of the environment.
•BMP180 Sensor
Measures air pressure and can also estimate altitude.
•16×2 LCD Display
Shows the weather data such as temperature, humidity, and pressure in real time.
•Breadboard
Used to connect all components without soldering.
•LED
Used as an indicator (for example, lights up when temperature crosses a limit).
•Buzzer
Gives sound alerts when certain weather conditions are reached.
•Battery (9V)
Provides power to the Arduino and the whole
circuit
Code:-
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <DHT.h>
#include <Adafruit_BMP085.h>
#define DHTPIN 2
#define DHTTYPE DHT11
#define LEDPIN 8
#define BUZZER 9
DHT dht(DHTPIN, DHTTYPE);
Adafruit_BMP085 bmp;
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
lcd.begin(16, 2);
lcd.backlight();
pinMode(LEDPIN, OUTPUT);
pinMode(BUZZER, OUTPUT);
dht.begin();
if (!bmp.begin()) {
lcd.print("BMP180 Error!");
while (1);
}
lcd.setCursor(0, 0);
lcd.print(“Weather Station”);
delay(2000);
lcd.clear();
}
void loop() {
float temperature = dht.readTemperature();
float humidity = dht.readHumidity();
float pressure = bmp.readPressure() / 100.0; // convert to hPa
if (isnan(temperature) || isnan(humidity)) {
lcd.setCursor(0, 0);
lcd.print("Sensor Error ");
return;
}
// Display Temperature
lcd.setCursor(0, 0);
lcd.print(“T:”);
lcd.print(temperature);
lcd.print("C ");
lcd.print(“H:”);
lcd.print(humidity);
lcd.print(“%”);
// Display Pressure
lcd.setCursor(0, 1);
lcd.print(“P:”);
lcd.print(pressure);
lcd.print("hPa ");
// Condition for Alert
if xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(temperature > 35) {
digitalWrite(LEDPIN, HIGH);
tone(BUZZER, 1000);
} else {
digitalWrite(LEDPIN, LOW);
noTone(BUZZER);
}
delay(2000);
}
