Skip to content

About

Smart_clock (WI-FI)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

smart_clock

🕒 ESP32 Smart Room Clock & Temperature Monitor

A compact smart room clock and weather monitor powered by an ESP32 DevKit V1 microcontroller, a 0.96" OLED display (SSD1306), and a DHT11 sensor. The project connects to Wi-Fi, automatically synchronizes accurate time using NTP servers, and displays room temperature with non-blocking screen switching.


✨ Features

  • Automatic Time Synchronization: Fetches precise time and date via the internet (NTP protocol) without needing an external RTC hardware module.
  • Climate Monitoring: Measures indoor temperature using the DHT11 sensor.
  • Adaptive Interface: Smoothly alternates (using non-blocking millis()) between the weather screen and the time/date screen every 5 seconds.
  • Clean Code Structure: Written in pure C++ for the Arduino IDE using optimized, industry-standard libraries.

🛠 Components Used

  • Microcontroller: ESP32 DevKit V1
  • Display: 0.96" OLED Display (I2C, SSD1306, 128x64 resolution)
  • Sensor: DHT11 (Temperature & Humidity Sensor)
  • Connectivity: Built-in Wi-Fi (ESP32)

1. Connecting the 0.96 OLED Display VCC (or VIN) on the display ➔ to 3V3 GND on the display ➔ to GND SCL on the display ➔ to GPIO 22 (or D22) SDA on the display ➔ to GPIO 21 (or D21)

2. Connecting the DHT11 Temperature Sensor VCC (or +) on the sensor ➔ to 3V3 GND (or -) on the sensor ➔ to GND DATA (or OUT / S) on the sensor ➔ to GPIO 4 (or D4)

🚀 How to Run

1. Prerequisites

Make sure you have ESP32 board support installed in your Arduino IDE (via Boards Manager). Also, install the following libraries via the Library Manager:

  • Adafruit SSD1306
  • Adafruit GFX Library
  • DHT sensor library

2. Flashing the Code

  1. Clone or download this repository to your PC.
  2. Open the smart_clock/smart_clock.ino file in the Arduino IDE.
  3. Update your Wi-Fi credentials in the code:
    const char* ssid     = "YOUR_SSID";
    const char* password = "YOUR_PASSWORD";

About

Smart_clock (WI-FI)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages