Skip to content

Instantly share code, notes, and snippets.

View MarcoCiau's full-sized avatar
🏠
Working from home

Marco Ciau MarcoCiau

🏠
Working from home
  • Mérida, Yucatán, México
View GitHub Profile
@Cyclenerd
Cyclenerd / AccessPoint.ino
Created July 26, 2017 19:46
ESP8266 : Create a WiFi access point and provide a DNS and web server on it, catch all traffic
/* Create a WiFi access point and provide a web server on it. */
#include <ESP8266WiFi.h>
#include "./DNSServer.h" // Patched lib
#include <ESP8266WebServer.h>
const byte DNS_PORT = 53; // Capture DNS requests on port 53
IPAddress apIP(10, 10, 10, 1); // Private network for server
DNSServer dnsServer; // Create the DNS object
ESP8266WebServer webServer(80); // HTTP server