So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Snarty
#77528 Hey all,

I'm new to using Arduino's especially the ESP2866. I've been tasked with having it pull the time from NTP and have it printed to our HTTP.

As of right now I have my 2866 set up to have a light turn on and off with two buttons on my HTTP. The end goal is to have it act as a timer to turn on at a certain time and turn off at a certain while pulling the time from the NTP.

What would be the best way to do this?
Last edited by Snarty on Thu Aug 02, 2018 8:18 am, edited 1 time in total.
User avatar
By btidey
#77534 By HTP do you mean an HTTP browser as that is what is sounds like.

There are NTP libraries that work well with ESP8266. E.g. https://github.com/gmag11/NtpClient There are examples included.

In terms of scheduling you need to think through what that means like

On off at fully specified time and dates?
On Off at same times every day?
On Off on some weekly schedule?

All are fairly easy to accomplish once you have the NTP time.
User avatar
By Snarty
#77540 Yes I meant HTTP...

By timing I mean on and off at the same time everyday.

Programming that part isn't what i'm exactly struggling with. I want to serial print the time from an NTP to the HTTP, and use that that time to schedule the on and off cycle.