Skip to content

convo97/Smart-socket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”Œ ESP32 GPIO Control via Web Interface

This project demonstrates how to set up an ESP32 as a Wi-Fi Access Point that hosts a web server. The server allows you to remotely control GPIO 15 (connected to pin 13 in code) via a simple HTML interface with ON/OFF (HIGH/LOW) buttons.

πŸ“· Preview

When connected to the ESP32 Access Point and visiting its IP address, you’ll see a web page with buttons to control GPIO 15:

[ HIGH ] [ LOW ]

markdown Copy Edit

πŸš€ Features

  • ESP32 runs in Access Point mode β€” no external Wi-Fi network needed.
  • Built-in web server on port 80.
  • Simple HTML interface to control a GPIO pin.
  • Useful for basic home automation or IoT control experiments.

πŸ› οΈ Hardware Requirements

  • ESP32 development board
  • LED, Relay module, or any output device connected to GPIO 15 (pin 13 in code)
  • USB cable for programming

πŸ§‘β€πŸ’» Code Overview

  • WiFi.softAP(): Sets up the ESP32 as an access point with SSID ESP32_AP and password 12345678.
  • WiFiServer: Hosts a basic HTTP server.
  • GPIO 15: Controlled based on HTTP requests /HIGH and /LOW.

πŸ”§ How to Use

  1. Flash the Code to your ESP32 using Arduino IDE or PlatformIO.
  2. Connect to ESP32 Wi-Fi Network
    • SSID: ESP32_AP
    • Password: 12345678
  3. Open a browser and go to: http://192.168.4.1
  4. Click the buttons to toggle GPIO 15 HIGH or LOW.

πŸ“‚ Project Files

  • main.ino β€” Source code for the ESP32 web server
  • README.md β€” Project documentation

πŸ“ Notes

  • GPIO 15 (pin 13 in the sketch) is used for control. Modify controlPin if you want to use another pin.
  • Web interface is minimal and responsive; can be expanded for more GPIOs.

πŸ“„ License

This project is open-source and available under the MIT License.


Made with ❀️ using ESP32

About

relay project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages