ArrowtronElectronics Store
Free shipping over ₹999
100% genuine components
Dispatch in 1–2 days
Secure payments · UPI, Cards

Mini Weather Station: DHT11 Temperature & Humidity on OLED

A desk-friendly weather station that shows live temperature and humidity on a crisp OLED display — a perfect first sensor project.

Beginner~45 minutes5 components

What you’ll build

The DHT11 sensor reports temperature and relative humidity once a second. The Arduino Nano reads it and renders big, readable numbers on the 0.96″ OLED over I2C, complete with degree symbols and a humidity bar.

Components you’ll need

ComponentQtyPrice
Arduino Nano ATmega328P Compatible Board1₹149
DHT111₹69
0.96 inch OLED Display Module I2C 128×64 Blue1₹149
400 Point Breadboard1₹299
Jumper Wires MM1₹299
Total₹965

Step-by-step guide

  1. Place the Nano and DHT11 on the breadboard. DHT11: VCC to 5V, GND to GND, DATA to pin D4.
  2. Connect the OLED over I2C: VCC to 5V, GND to GND, SDA to A4, SCL to A5.
  3. Install the “DHT sensor library” by Adafruit plus Adafruit_GFX and Adafruit_SSD1306 from the Library Manager (accept the dependency prompts).
  4. Upload the sketch below.
  5. Breathe gently on the sensor — humidity should jump within a couple of readings.

The code

The sketch polls the DHT11 every two seconds and refreshes the display. Failed readings (the DHT11 occasionally skips one) are simply retried.

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <DHT.h>
Adafruit_SSD1306 display(128, 64, &Wire);
DHT dht(4, DHT11);
void setup(){ dht.begin(); display.begin(SSD1306_SWITCHCAPVCC, 0x3C); }
void loop(){
  float t = dht.readTemperature(), h = dht.readHumidity();
  if(isnan(t) || isnan(h)){ delay(500); return; }
  display.clearDisplay();
  display.setTextColor(WHITE);
  display.setTextSize(2); display.setCursor(0,4);
  display.print(t,1); display.print((char)247); display.print("C");
  display.setCursor(0,36); display.print(h,0); display.print("% RH");
  display.display();
  delay(2000);
}

Build this project

Add all 5 required components to your cart in one click — total ₹965.

Add all components to cart
Scroll to Top