Rohan Barnwal
Published

Small Weather Station Using Bluetooth Connectivity

Hi guys in this project I teach you how to create a small weather station using Arduino Uno and it also has Bluetooth connectivity

BeginnerFull instructions provided2,210
Small Weather Station Using Bluetooth Connectivity

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
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
Male/Female Jumper Wires
Male/Female Jumper Wires
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Connection

Code

Code

Arduino
#Created By Rohan Barnwal

#include "DHT.h"

#define DHTPIN 2     // Digital pin connected to the DHT sensor

#define DHTTYPE DHT11   // DHT 11



DHT dht(DHTPIN, DHTTYPE);

void setup() {
  Serial.begin(9600);
  Serial.println(F("DHTxx test!"));

  dht.begin();
}

void loop() {
  // Wait a few seconds between measurements.
  delay(1000);

  // Reading temperature or humidity takes about 250 milliseconds!
  // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
  float h = dht.readHumidity();
  // Read temperature as Celsius (the default)
  float t = dht.readTemperature();
  // Read temperature as Fahrenheit (isFahrenheit = true)
  float f = dht.readTemperature(true);

  // Check if any reads failed and exit early (to try again).
  if (isnan(h) || isnan(t) || isnan(f)) {
    Serial.println(F("Failed to read from DHT sensor!"));
    return;
  }

  // Compute heat index in Fahrenheit (the default)
  float hif = dht.computeHeatIndex(f, h);
  // Compute heat index in Celsius (isFahreheit = false)
  float hic = dht.computeHeatIndex(t, h, false);

  Serial.print(F("Humidity: "));
  Serial.print(h);
  Serial.print(F("%  Taapmaan: "));
  Serial.print(t);
  Serial.print(F("°Celsius hai aur "));
  Serial.print(f);
  Serial.print(F("°Fahrenheit  hai aur Heat index: "));
  Serial.print(hic);
  Serial.print(F("°Celsius hai  aur   "));
  Serial.print(hif);
  Serial.println(F("°Fahrenhiet hai"));
}

Credits

Rohan Barnwal

Rohan Barnwal

19 projects • 28 followers
Rohan Barnwal - maker, hacker, tech enthusiast. I explore new tech & find innovative solutions. See my projects on hackster.io!

Comments