Tekko BDSimSimulatorProjects

বায়ুচাপ দেখে উচ্চতা মাপার যন্ত্র — ওঠার সময় বিপ বাজেBarometric Altimeter with BMP280

প্রতি ১০০ মিটার ওঠায় বায়ুচাপ প্রায় ১২ hPa কমে — তাই চাপ থেকেই উচ্চতা বের হয়ে আসে। যত উপরে ওঠা, বিপ তত দ্রুত — পাহাড়ে নিচে তাকিয়ে দেখার দরকারই পড়ে না।

Air pressure drops roughly 12 hPa every 100 m of climb, so height falls straight out of the barometer formula. The beeper gets faster the higher you go — hikers hear their altitude without looking down.

▶ ফ্রি চালিয়ে দেখো / Run it free Parts অর্ডার করো (WhatsApp)

সার্কিট ডায়াগ্রাম · Circuit diagram

Barometric Altimeter with BMP280 circuit diagram — Arduino Uno R3, Weather sensor BME280, LCD 16x2 with I2C, Buzzer (5 V), Resistor 330Ω, LED (blue), Jumper wires

যা যা লাগবে · Parts you need

তার লাগানো · Wiring

Weather sensor BME280 VCC→Arduino Uno R3 5V
Weather sensor BME280 GND→Arduino Uno R3 GND
Weather sensor BME280 SDA→Arduino Uno R3 A4
Weather sensor BME280 SCL→Arduino Uno R3 A5
LCD 16x2 with I2C VCC→Arduino Uno R3 5V
LCD 16x2 with I2C GND→Arduino Uno R3 GND
LCD 16x2 with I2C SDA→Arduino Uno R3 A4
LCD 16x2 with I2C SCL→Arduino Uno R3 A5
Buzzer (5 V) +→Arduino Uno R3 D8
Buzzer (5 V) -→Arduino Uno R3 GND.3
Arduino Uno R3 D13→Resistor a
Resistor b→LED A
LED K→Arduino Uno R3 GND.3

Code (Arduino C++)

#include <Wire.h>
#include <Adafruit_BME280.h>
#include <LiquidCrystal_I2C.h>
// Barometric altimeter: air pressure drops about 12 hPa every 100 m you climb,
// so height falls straight out of the barometer formula. The beeper gets
// faster the higher you go — hikers hear their altitude without looking down
// at a screen. Slide the "pressure" control on the BME280 as if you climbed.
Adafruit_BME280 bme;
LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup() {
  Serial.begin(9600);
  if (!bme.begin(0x76)) { Serial.println("BME280 not found"); while (1) delay(10); }
  lcd.init();
  lcd.backlight();
  pinMode(8, OUTPUT);
  pinMode(13, OUTPUT);
}

void loop() {
  float press = bme.readPressure() / 100.0;          // hPa
  float alt = 44330.0 * (1.0 - pow(press / 1013.25, 0.1903));
  int zone = alt > 1000 ? 2 : (alt > 300 ? 1 : 0);   // 0 quiet, 1 slow, 2 fast
  bool beep = (zone == 2) || (zone == 1 && millis() % 1000 < 300);
  digitalWrite(8, beep ? HIGH : LOW);
  digitalWrite(13, zone > 0 ? HIGH : LOW);
  lcd.setCursor(0, 0); lcd.print("Alt: "); lcd.print(alt, 0); lcd.print(" m     ");
  lcd.setCursor(0, 1); lcd.print(press, 1); lcd.print(" hPa");
  Serial.print("Altitude: "); Serial.print(alt, 0);
  Serial.print(" m | Beeper: "); Serial.println(zone == 2 ? "fast" : (zone == 1 ? "slow" : "none"));
  delay(300);
}

আরো project · More projects