This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> //https://github.com/esp8266/Arduino | |
#include <WiFiManager.h> //https://github.com/kentaylor/WiFiManager | |
const unsigned long ONE_SECOND = 1000 * 1000; | |
int start; | |
int now; | |
int codeTime; | |
IPAddress ip= IPAddress(192,168,1,27); | |
IPAddress gw= IPAddress(192,168,1,1); | |
IPAddress subnet= IPAddress(255,255,255,0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IPAddress ip= IPAddress(192,168,1,27); | |
IPAddress gw= IPAddress(192,168,1,1); | |
IPAddress subnet= IPAddress(255,255,255,0); | |
IPAddress dns= IPAddress(192,168,1,1); | |
static struct station_config conf; | |
char mac[18] = { 0 }; | |
void setup() { | |
start = millis(); | |
WiFi.config(ip,gw,subnet, dns); | |
if (WiFi.SSID()=="") WiFi.begin("SSID","password"); |