DIY Cool Watch

DIY Cool Watch © GPL3+

Create a cool watch with Arduino.

  • 2,794 views
  • 1 comment
  • 8 respects

Components and supplies

About this project

DIY Cool Watch

How to create simply SmartWatch that shows Current time with Arduino and RTC DS3231 Module, precision synchronize the time.

Code

OLEDRTC.inoArduino
//by: di2tnugraha
#include <Wire.h>
#include <DS3231.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);
DS3231 clock;
RTCDateTime dt;

void setup()
{
  Serial.begin(9600);
  // Initialize DS3231
  Serial.println("Initialize DS3231");;
  clock.begin();
  // Set sketch compiling time
  clock.setDateTime(__DATE__, __TIME__);

  display.begin(SSD1306_SWITCHCAPVCC, 0x3C); 
  display.display();
  delay(2000);
  display.clearDisplay();
  display.setTextSize(2);
  display.setTextColor(WHITE, BLACK);
  display.setCursor(0,0);
  display.println("KENZIE");
  display.println("CHANNEL");
  display.display();
  delay(3000);
}

void loop()
{
  dt = clock.getDateTime();

  display.clearDisplay();
  Serial.println(clock.dateFormat("H:i:s", dt));
    // text display tests
  display.setTextSize(3.5);
  display.setTextColor(WHITE, BLACK);
  display.setCursor(10,0);  
  display.print(clock.dateFormat("H:i", dt));
  display.display();

  display.setTextSize(2);
  display.setTextColor(WHITE, BLACK);
  display.setCursor(104,0);  
  display.print(clock.dateFormat("s", dt));
  display.display();

  Serial.println(clock.dateFormat("D d-M-y", dt));
  display.setTextSize(1);
  display.setTextColor(WHITE, BLACK);
  display.setCursor(15,25);
  display.println(clock.dateFormat("D, d M Y", dt));
  display.display();

  delay(1000);
}

Schematics

DIY Cool SmartWatch
Arduino oled connection m8afmz0nwi

Comments

Similar projects you might like

Multifunctional Watch With Arduino Uno

Project showcase by shaqibmusa94

  • 4,264 views
  • 2 comments
  • 8 respects

DIY Virtual Reality Skateboard

Project tutorial by Matthew Hallberg

  • 4,247 views
  • 7 comments
  • 17 respects

Arduino DIY Alarm

Project showcase by Team Robert's Robot

  • 3,559 views
  • 3 comments
  • 5 respects

Cool Baby Piano

Project showcase by Team cool guys

  • 1,140 views
  • 0 comments
  • 1 respect

DIY Smart Cane Using Arduino

Project tutorial by suhail jr

  • 13,619 views
  • 1 comment
  • 17 respects
Add projectSign up / Login