loading

Running on your ESP8266, this NTP Time Zone Arduino

IDE Sketch will display the exact time on MAX 7219 Display.

The sketch uses the Timezone library of JChristensen which converts the time to daylight summer time and standard time for any region.

Clock Features:-

  • Exact Time
  • Synchronization of Time With NTP Servers
  • Indication, If Time Will Not be Synchronized , Hash before “A”(Am) and “P”(PM)
  • Daylight Summer Time and Standard Time for Any Region.
  • Saving Access Point Credentials in The Clock Through Web Browser
  • Credentials Can Be Erased With a Push Button Switch

The provided libraries will comply only with Arduino IDE 1.6.5 and you must use the provided libraries.

Do not update the libraries after unzipping the provided libraries. It is better you rename your present “libraries” folder and copy all the library files in the new “libraries” folder.

Don’t forget to edit the “Timezone lines” in the sketch for your region. Documentation is available at JChristensen's GitHub page.

Required Hardware.

  1. Power Supply 3.3V and 5V
  2. ESP8266
  3. MAX 7219 LED Display
  4. Push Button Switch

The Zip folder contains, Libraries, Drawing and The Sketch.

<p>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</p><p>#include &lt;Time.h&gt; to</p><p>#include &lt;TimeLib.h&gt;</p><p>------</p><p>unsigned int HexToBCD(unsigned int number)</p><p>{</p><p> unsigned char i = 0;</p><p> unsigned int k = 0;</p><p> while (number)</p><p> {</p><p> k = (k) | ((number % 10) &lt;&lt; i * 4);</p><p> number = number / 10;</p><p> i++;</p><p> }</p><p> return (k);</p><p>}</p><p>void digitalClockDisplay() {</p><p> tmElements_t tm;</p><p> char *dayOfWeek;</p><p> breakTime(now(), tm);</p><p> lc.clearDisplay(0);</p><p> // Start with left digit</p><p> lc.setDigit(0, 7, int(hour(CE.toLocal(utc, &amp;tcr)) / 10), false);</p><p> lc.setDigit(0, 6, (hour(CE.toLocal(utc, &amp;tcr)) % 10), false);</p><p> lc.setChar(0, 5, '-', false);</p><p> lc.setDigit(0, 4, (minute() / 10), false);</p><p> lc.setDigit(0, 3, (minute() % 10), false);</p><p> lc.setChar(0, 2, '-', false);</p><p> lc.setDigit(0, 1, int(second() / 10), false);</p><p> lc.setDigit(0, 0, (second() % 10), false);</p><p> lc.setDigit(1, 7, int(day(CE.toLocal(utc, &amp;tcr)) / 10), false);</p><p> lc.setDigit(1, 6, (day(CE.toLocal(utc, &amp;tcr)) % 10), true);</p><p> lc.setDigit(1, 5, int(month(CE.toLocal(utc, &amp;tcr)) / 10), false);</p><p> lc.setDigit(1, 4, (month(CE.toLocal(utc, &amp;tcr)) % 10), true);</p><p> unsigned int count_one;</p><p> count_one = HexToBCD(year(CE.toLocal(utc, &amp;tcr)));</p><p> lc.setDigit(1, 3, ((count_one &gt;&gt; 12) &amp; 0x0F), false);</p><p> lc.setDigit(1, 2, ((count_one &gt;&gt; 8) &amp; 0x0F), false);</p><p> lc.setDigit(1, 1, ((count_one &gt;&gt; 4) &amp; 0x0F), false);</p><p> lc.setDigit(1, 0, (count_one &amp; 0x0F), false);</p><p>}</p>
<p>AdrianCronauer Thanks for your comments. I agree that most of the libraries are standard but I have edited the timezone library by removing all lines related with EEPROM in order to compile</p>
<p>Neat idea :)</p>

About This Instructable

737views

9favorites

License:

More by sebouh:ESP8266 NTP TIMEZONE CLOCK WITH WiFi MANAGER 
Add instructable to: