Raspberry Pi based weather station

raspberry pi

Let us Build IoT Based Weather forecasting System

The best weather prediction for the present moment is to look out of the window!

Mehmet Murat ildan
Due to Climatic change, Pollution and Global Warming, environmental monitoring have received much attention recently. everyone wants to stay updated about the latest weather updates of any place like a city, college campus or any other particular area. Since the world is changing so fast so there should be the weather stations that send notification on smartphone about the weather. Here in this article we present a weather station that is very helpful for any places. This weather station is based on Raspberry pi and IOT(internet of things).

Hardware Required

Software Required

Step 1 : Download Raspberry Pi Image from official Website

Your Raspberry Pi Board needs an OS to work. This is it. Raspberry Pi OS (previously called Raspbian) is Raspberry pi foundation’s official supported operating system. 

There are 3 options available – 

  • Raspberry Pi OS Lite
  • Raspberry Pi OS with desktop and recommended software
  • Raspberry Pi OS with desktop.

I personally recommend, you should download “Raspberry Pi OS with desktop and recommended software” if you are NOOBS. 

Step 2 : Write Raspberry Pi OS on Memory Card

Open BalenaEtcher tool from All Programs, Select Raspberry pi image then select a drive (SD Card) on which you want to install raspberry pi OS and finally click on FLASH. It takes 2-3 Minutes to copying file on your SD card.

Raspberry pi

Step 3 : Insert SD card Into Raspberry pi and Power up Your Raspberry Pi

Raspberry pi will start installing operating system. It takes approximitely 10-15 minutes. then your raspberry pi is Ready to work.

Step 4 : Connect Sensor to Raspberry Pi using Jumper cables (i'm using DHT11 )

Raspberry pi
  1. Connect VCC Pin of DHT11 to 3.3V /5V of Raspberry pi.
  2. Connect Ground pin of DHT11 to Ground Pin of Raspberry Pi.
  3. Connect Output pin of DHT11 to GPIO4 of Raspberry pi.

Step 5 : Open terminal and Write a Program using NANO Text editor.

sudo nano dht11.py

Write Following Code in dht11.py file.

import Adafruit_DHT 
sensor = Adafruit_DHT.DHT11
pin = 4
while True:
        humidity, temperature = Adafruit_DHT.read_retry(sensor, pin)
    
     print('Temp={0:0.1f}*C  Humidity={1:0.1f}%'.format(temperature, humidity))

Step 6 : This is final Step,save program and execute it.

Save program using shortcut key ctrl+o andexit using ctrl+x and execute program using following command.

sudo python dht11.py

In this tutorial, you learned how to develop a Weather station using Raspberry pi. i would sauggest, use DTH22 instead of DHT11 for more accurecy.

Get Discound on Domain and Hosting Click Here

1 thought on “Raspberry Pi based weather station”

  1. Pingback: Drones for Delivery in 2020: The Future of Transportation & Logistics - IoT Forum

Leave a Comment

Your email address will not be published. Required fields are marked *