Arduino Clock (without Rtc) With Temperature And Humidity
Maybe your like
Embed the widget on your own site
Add the following snippet to your HTML:

This project is a arduino clock made without using an rtc and it is totally accurate it also displays the temperature and the humidity
Read up about this project on 
Arduino Clock (without rtc) with temperature and humidity
harshitmehra20075 6,322This project is a arduino clock made without using an rtc and it is totally accurate it also displays the temperature and the humidity
BeginnerFull instructions provided2 hours6,322Things used in this project
Hardware components | |||||
![]() |
| × | 1 |
| |
![]() |
| × | 1 |
| |
![]() |
| × | 1 | ||
![]() |
| × | 1 | ||
![]() |
| × | 1 |
| |
Software apps and online services | |||||
![]() |
| ||||
Story
Don't mind the look of it but it works very fine I used the arduino nano as the programming board for the project You need to set the time in the code
Above the void setupI am thinking to upgrade it with a few more things but till now I am just using a dht11 sensor with a LCD 16x2 along with an i2c module if you don't have a i2c module believe me you need to buy it saves alot of wire and effort and to me the wiring along with i2c is simple so I used it you can edit the code if you want to use normal lcd display
also I used the simple DHT library which makes working with the DHT11 sensor and I changed the increase rate of seconds to 0.50 as when I finalized it with arduino nano it started moving 1 second faster idk why
hereso for the connects I used a DHT 11 with 4 pins and here's its pinout
data pin goes to digital pin 11 as per the code and for the lcd
vcc goes to arduino 5v (same for the DHT11 sensor)
gnd goes to arduino gnd (same for the DHT11 sensor)
scl goes to A5
sda goes to A4
this is all for the project this was my first upload pardon me if any mistakes
thanks,
Read moreSchematics
The connections

Code
- Code
Code
C/C++Just upload it#include <SimpleDHT.h> #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27, 16, 2); int h = Your hours here; int m = Your minutes here; int s = seconds here; int flag = 0; int TIME = 0; const int hs = A0; const int ms = A1; int state1 = 0; int state2 = 0; int pinDHT11 = 11; SimpleDHT11 dht11(pinDHT11); void setup() { pinMode(hs,INPUT_PULLUP); pinMode(ms,INPUT_PULLUP); lcd.init(); lcd.init(); lcd.backlight(); lcd.print("Made by - "); lcd.setCursor(0,1); lcd.print("Harshit"); delay (3000); lcd.clear(); } void loop() { byte temperature = 0; byte humidity = 0; int err = SimpleDHTErrSuccess; if ((err = dht11.read(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess){ return; } lcd.setCursor(0, 0); s = s + 0.50; lcd.print("TIME:" ); lcd.print(h); lcd.print(":"); lcd.print(m); lcd.print(":"); lcd.print(s); if (flag < 12) lcd.print(" AM"); if (flag == 12) lcd.print(" PM"); if (flag > 12) lcd.print(" PM"); if (flag == 24) flag = 0; delay(1000); lcd.clear(); if (s == 60) { s = 0; m = m + 1; } if (m == 60) { m = 0; h = h + 1; flag = flag + 1; } if (h == 13) { h = 1; } state1 = digitalRead(hs); if (state1 == 0) { h = h + 1; flag = flag + 1; if (flag < 12) lcd.print(" AM"); if (flag == 12) lcd.print(" PM"); if (flag > 12) lcd.print(" PM"); if (flag == 24) flag = 0; if (h == 13) h = 1; } state2 = digitalRead(ms); if (state2 == 0) { s = 0; m = m + 1; } s=s+1; if(s==60){ s=0; m=m+1; } if(m==60) { m=0; h=h+1; } if(h==13) { h=1; flag=flag+1; if(flag==2)flag=0; } lcd.setCursor(0,1); lcd.print("Temp= "); lcd.setCursor(5,1); lcd.print((int)temperature); lcd.setCursor(7,1); lcd.print("C"); lcd.setCursor (9,1); lcd.print("H="); lcd.setCursor(11,1); lcd.print((int)humidity); lcd.setCursor(13,1); lcd.print("%"); }Credits
harshitmehra2007
3 projects • 2 followersFollowComments
Related channels and tags
- clocks
- easy
- lcd
- lcd_i2c
- weather
- without rtc
Tag » Arduino Nano 33 Ble Sense Rtc
-
RTC On Arduino Nano 33 BLE?
-
Arduino Nano 33 BLE Sense Projects
-
RTC In BLE Nano - Question - Mbed
-
Lab: Using A Real-Time Clock - NYU ITP
-
Arduino Nano 33 BLE (Sense) - Zephyr Documentation
-
NANO 33 BLE Download - CircuitPython
-
Arduino Nano 33 IoT Board - Getting Started - DroneBot Workshop
-
ARDUINO NANO 33 BLE SENSE - Element14 Community
-
Ostaquet/Arduino-Nano-33-IoT-Ultimate-Guide - GitHub
-
Arduino Libraries
-
All Libraries - Arduino Library List
-
Arduino Nano 33 BLE Sense | ABX00031 | Core Electronics Australia
-
ARDUINO ABX00027 Nano 33 IoT User Manual - Manuals+









