Code Monkey home page Code Monkey logo

esp8266-ntp-time-on-an-oled-with-wifi-manager's Introduction

ESP8266-NTP-time-on-an-OLED-with-WiFi-Manager

**** YOU MUST USE THE DISPLAY DRIVER (1306) PROVIDED ****

An ESP8266 displays accurate time using NTP on an OLED display, using the WiFi Manager to make a network connection. So, place the sketch and Adafruit_ssd1306.cpp and .h files in the same folder

DST adjustment rules have been refined and now support correct time change-over.

Get the Wemos OLED drivers frome here: https://github.com/mcauser/Adafruit_SSD1306

esp8266-ntp-time-on-an-oled-with-wifi-manager's People

Contributors

g6ejd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp8266-ntp-time-on-an-oled-with-wifi-manager's Issues

NTP time crashes at ESP32E board

I have found a special application for my ESP12E module, an MIT program for an internet clock that is amazing. I would like to try it so that I connect all the wires. I connected my 0.96'' OLED 128x64 display and have modified the Adafruit_SSD1306.h in the proper resolution for my display and, finally, ran the program. I have been enthusiastic because all the setup for the clock is configured from an internet browser. I saw that for the first time... all previous programs demanded to put all this variables into a code. If I want to change my location (WiFi router), I have to reprogram it.
The problem is that I run the code and setup the WIFI, I make all the necessary adjustments that I want for the clock and I see the right time for my location(Country) in the display OLED. That happiness stays only for a few seconds because the ESP12E crashes and goes back to web server for the clock configurations. I push the "RUN" button in the webpage and it shows the time again for 5 seconds, when it crashes again
I post it here to find nice people to help me fix the problem because I love this code.
I have attached a photo of my ESP12E and OLED, and finally a copy of the report of serial port showing the crash. Without your help it would take me weeks of debugging to find the problem and my age let alone my work and family won't let me.

Report.zip

Missing code attribution to QA on StackOverflow

The code used to calculate the date and time has been taken from my question at https://stackoverflow.com/questions/21593692/convert-unix-timestamp-to-date-without-system-libs

All code on Stack Overflow is published under cc by-sa 4.0 with attribution required
https://creativecommons.org/licenses/by-sa/4.0/
https://stackoverflow.blog/2009/06/25/attribution-required/

The offending code is:

https://github.com/G6EJD/ESP8266-NTP-time-on-an-OLED-with-WiFi-Manager/blob/87507a3c8b38f733492465642fb8fbcc20a16c33/ESP8266_TN008g_NTP_Time_OLED_and_WIFI_Manager_UK_Webserver.ino#L149:L187

Since the license states that If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. you must change the license of this source file to CC by-sa 4.0 and provide attribution, or remove the offending code.

if (millis() % 60000)

Hi David,
I'd like to know what you're intending to accomplish with the logic expression inside the loop().
Regards,
Seurat-Atreides

Geting 2 screens

Great project, I am eager to really see the clock, but I get a "screen"
Dec
0-22485- Jan 70
2:0-12
(0-52) AM ((((counting down)))
DST-UKUSAAUS
Before this the oled very briefly displays what I think is the calendar and clock, but it is so rapid I don´t know is it is correct.
I don't really understand. I think it is some silly mistake of mine.
Thanks for your help, I would love to see the clock ticking!

ESP8266_TN008f_NTP_Time_OLED_WIFI_Manager_Webserver_SSD1306 adds timezone offset everry second...

ESP8266_TN008f_NTP_Time_OLED_WIFI_Manager_Webserver_SSD1306 adds the timezone offset every second when running. I saw you resolved it in the other two sketches, but not this one :) (after I figured exact the same way to resolve it myself). Maybe you want to resolve this:

void display_time(){ // Note Ticker called routines cannot get a time update using timeclient.update()!
epoch = epoch + 1;
UTC_hours = epoch % 86400 / 3600;
if (DST) epoch = epoch + 3600;
epoch = epoch + int(TimeZone * 3600);
calcDate();
epoch = epoch - int(TimeZone * 3600); // <- is missing there...

Very nice work !!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.