author
4Commentsnear Stuttgart, GermanyJoined February 12th, 2007

Tell us about yourself!

Complete Your Profile
  • ESP8266 NTP TIMEZONE CLOCK WITH WiFi MANAGER

    Thanks for this project. I was looking for such cheap clock. I did some modifications by adding a second unit which displays day, month and year. In addition, the libraries included in the ZIP are not neccesary as they are standard. You need to change the line#include <Time.h> to#include <TimeLib.h>------unsigned int HexToBCD(unsigned int number){ unsigned char i = 0; unsigned int k = 0; while (number) { k = (k) | ((number % 10) << i * 4); number = number / 10; i++; } return (k);}void digitalClockDisplay() { tmElements_t tm; char *dayOfWeek; breakTime(now(), tm); lc.clearDisplay(0); // Start with left digit lc.setDigit(0, 7, int(hour(CE.toLocal(utc, &tcr)) / 10), false); lc.setDigit(0, 6, (hour(CE.toLocal(utc, &tcr)) % 10), false); lc.set...

    see more »

    Thanks for this project. I was looking for such cheap clock. I did some modifications by adding a second unit which displays day, month and year. In addition, the libraries included in the ZIP are not neccesary as they are standard. You need to change the line#include <Time.h> to#include <TimeLib.h>------unsigned int HexToBCD(unsigned int number){ unsigned char i = 0; unsigned int k = 0; while (number) { k = (k) | ((number % 10) << i * 4); number = number / 10; i++; } return (k);}void digitalClockDisplay() { tmElements_t tm; char *dayOfWeek; breakTime(now(), tm); lc.clearDisplay(0); // Start with left digit lc.setDigit(0, 7, int(hour(CE.toLocal(utc, &tcr)) / 10), false); lc.setDigit(0, 6, (hour(CE.toLocal(utc, &tcr)) % 10), false); lc.setChar(0, 5, '-', false); lc.setDigit(0, 4, (minute() / 10), false); lc.setDigit(0, 3, (minute() % 10), false); lc.setChar(0, 2, '-', false); lc.setDigit(0, 1, int(second() / 10), false); lc.setDigit(0, 0, (second() % 10), false); lc.setDigit(1, 7, int(day(CE.toLocal(utc, &tcr)) / 10), false); lc.setDigit(1, 6, (day(CE.toLocal(utc, &tcr)) % 10), true); lc.setDigit(1, 5, int(month(CE.toLocal(utc, &tcr)) / 10), false); lc.setDigit(1, 4, (month(CE.toLocal(utc, &tcr)) % 10), true); unsigned int count_one; count_one = HexToBCD(year(CE.toLocal(utc, &tcr))); lc.setDigit(1, 3, ((count_one >> 12) & 0x0F), false); lc.setDigit(1, 2, ((count_one >> 8) & 0x0F), false); lc.setDigit(1, 1, ((count_one >> 4) & 0x0F), false); lc.setDigit(1, 0, (count_one & 0x0F), false);}

    View Instructable »