/*********
Rui Santos
Complete project details at https://randomnerdtutorials.com
*********/
// Load Wi-Fi library
#include <WiFi.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C LCD = LiquidCrystal_I2C(0x27, 16, 2);
// Replace with your network credentials
const char* ssid = "ESP32-Access-Point";
const char* password = "123456789";
// Set web server port number to 80
WiFiServer server(80);
// Variable to store the HTTP request
String header;
// Auxiliar variables to store the current output state
String output26State = "off";
String output27State = "off";
// Assign output variables to GPIO pins
const int output26 = 26;
const int output27 = 27;
void setup() {
//Serial.begin(115200);
LCD.init();
LCD.backlight();
LCD.setCursor(0, 0);
// Connect to Wi-Fi network with SSID and password
LCD.print("Access Point...");
// Remove the password parameter, if you want the AP (Access Point) to be open
WiFi.softAP(ssid, password);
IPAddress IP = WiFi.softAPIP();
LCD.setCursor(0, 1);
LCD.print("AP IP address: ");
LCD.setCursor(0, 2);
LCD.println(IP);
server.begin();
}
void loop() {
delay(100);
}