Narin Jvnmrdn
Published © Apache-2.0

MiniTimekeeper

NanoClock shows real-time using Arduino Nano, DS1307, and TM1637, with buzzer alerts — simple, smart, and perfect for beginners.

IntermediateShowcase (no instructions)24 hours77
MiniTimekeeper

Things used in this project

Story

Read more

Code

clock

Arduino
arduino
bread board
#include <Wire.h>
#include <RTClib.h>
#include <TM1637Display.h>
#define CLK 2   
#define DIO 3  

RTC_DS3231 rtc;
TM1637Display display(CLK, DIO);

void setup() {
  Wire.begin();
  display.setBrightness(7); 

  if (!rtc.begin()) {
    while (1);  
  }

  
   rtc.adjust(DateTime(2025, 5, 13, 19, 34, 0));
}

void loop() {
  DateTime now = rtc.now();

  int hour = now.hour();
  int minute = now.minute();


  int displayTime = hour * 100 + minute;


  bool showDots = now.second() % 2;

ه
  display.showNumberDecEx(displayTime, showDots ? 0b01000000 : 0, true);

  delay(1000);
} 

Credits

Narin Jvnmrdn
3 projects • 0 followers

Comments