diff options
author | Anton Šijanec <sijanecantonluka@gmail.com> | 2019-12-14 20:55:18 +0100 |
---|---|---|
committer | Anton Šijanec <sijanecantonluka@gmail.com> | 2019-12-14 20:55:18 +0100 |
commit | 7eaa0674d83351828a2e235752d21f160b5fe9af (patch) | |
tree | 2c2412b3f5a67410fe2c878f2f7cbf19232f0f76 /f000_sijaneciot.ino | |
parent | first commit (diff) | |
download | sijaneciot-7eaa0674d83351828a2e235752d21f160b5fe9af.tar sijaneciot-7eaa0674d83351828a2e235752d21f160b5fe9af.tar.gz sijaneciot-7eaa0674d83351828a2e235752d21f160b5fe9af.tar.bz2 sijaneciot-7eaa0674d83351828a2e235752d21f160b5fe9af.tar.lz sijaneciot-7eaa0674d83351828a2e235752d21f160b5fe9af.tar.xz sijaneciot-7eaa0674d83351828a2e235752d21f160b5fe9af.tar.zst sijaneciot-7eaa0674d83351828a2e235752d21f160b5fe9af.zip |
Diffstat (limited to 'f000_sijaneciot.ino')
-rw-r--r-- | f000_sijaneciot.ino | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/f000_sijaneciot.ino b/f000_sijaneciot.ino new file mode 100644 index 0000000..0e6e5ee --- /dev/null +++ b/f000_sijaneciot.ino @@ -0,0 +1,39 @@ +#include <ESP8266WiFi.h> +#include <ESP8266mDNS.h> +#include <ESP8266WebServer.h> +#include <WiFiClient.h> +#include "FS.h" +#include <TimeLib.h> +#include <WiFiUdp.h> +#include <ESP8266FtpServer.h> +#include <ESP8266httpUpdate.h> +extern "C" { +#include <user_interface.h> +} +const int verzija[3] = {0, 0, 0}; +const char* program_ime = "sijaneciot"; +String dostopnatocka[2]; +String oddaljenadostopnatocka[2]; +bool razhroscevanje = true; +ESP8266WebServer server(80); +FtpServer ftpSrv; +File fsUploadFile; // a File object to temporarily store the received file +static const char ntpServerName[] = "0.pool.ntp.org"; +//static const char ntpServerName[] = "time.nist.gov"; +//static const char ntpServerName[] = "time-a.timefreq.bldrdoc.gov"; +//static const char ntpServerName[] = "time-b.timefreq.bldrdoc.gov"; +//static const char ntpServerName[] = "time-c.timefreq.bldrdoc.gov"; + +const int timeZone = 1; // Central European Time +//const int timeZone = -5; // Eastern Standard Time (USA) +//const int timeZone = -4; // Eastern Daylight Time (USA) +//const int timeZone = -8; // Pacific Standard Time (USA) +//const int timeZone = -7; // Pacific Daylight Time (USA) + +WiFiUDP Udp; +unsigned int localPort = 8888; // local port to listen for UDP packets + +time_t getNtpTime(); +void digitalClockDisplay(); +void printDigits(int digits); +void sendNTPpacket(IPAddress &address); |