summaryrefslogtreecommitdiffstats
path: root/f000_sijaneciot.ino
blob: da56405d8bf67d7032959ca52c99a9740471bd91 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <WiFiClient.h>
#include "FS.h"
#include <TimeLib.h>
#include <WiFiUdp.h>
#include <ESP8266FtpServer.h>
#include <ESP8266httpUpdate.h>
// for weather
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#include <BH1750.h>
// end for weather

extern "C" {
#include <user_interface.h>
}
#define DISALLOW_403 (false)
  IPAddress ipas(10, 82, 66, 1);
  IPAddress gatewayas(10, 82, 66, 1);
  IPAddress subnetas(255, 255, 255, 0);
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[] = "us.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 getTime();
void sendNTPpacket(IPAddress &address);