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> | |
WiFi.mode(WIFI_AP); | |
WiFi.softAP(config.ssid, config.password); |
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 "EEPROMAnything.h" | |
#define RESETPIN D1 | |
struct config_t{ | |
char ssid[17] = "ESP8266 Test"; | |
char password[17] = "password"; | |
} config; | |
void setup() { |
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
struct config_t{ | |
char ssid[17] = "ESP8266 Test"; | |
char password[17] = "password"; | |
} config; |
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 <Wire.h> | |
#include <Adafruit_PWMServoDriver.h> | |
#include <RTClib.h> | |
#include <PGMWrap.h> | |
Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver(); | |
RTC_DS3231 rtc; | |
uint16_p servoMap0[] PROGMEM = {448, 411, 375, 342, 309, 275, 242, 210, 178, 148}; | |
uint16_p servoMap1[] PROGMEM = {524, 481, 441, 402, 361, 322, 282, 244, 206, 169}; |
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> | |
#include <ESP8266WebServer.h> | |
#include <ESP8266mDNS.h> | |
#include <DNSServer.h> | |
DNSServer dnsServer; | |
ESP8266WebServer webServer(80); | |
void setup() { | |
// put your setup code here, to run once: |
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 <DNSServer.h> | |
DNSServer dnsServer; | |
void setup() { | |
dnsServer.start(53, "esp.local", WiFi.softAPIP()); | |
} | |
void loop() { | |
dnsServer.processNextRequest(); |
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 <ESP8266mDNS.h> | |
MDNS.begin("esp"); |
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> | |
#include <ESP8266WebServer.h> | |
#include "FS.h" | |
ESP8266WebServer webServer(80); | |
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(115200); | |
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
// Create a simple homepage | |
webServer.serveStatic("/", SPIFFS, "/index.html"); |
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
Dir dir = SPIFFS.openDir("/"); | |
while (dir.next()) | |
Serial.printf("FS File: %s\n", dir.fileName().c_str()); |