Reviewed and Evaluated by AJr.Allan
This project demonstrates how to use an ESP32 microcontroller to control the brightness of an LED via a web interface. The ESP32 creates a WiFi access point, hosts a web page, and allows users to adjust the LED brightness using a slider.
- Connects to a specified WiFi network.
- Hosts a web page accessible from any device on the same network.
- Provides a slider to adjust the LED brightness in real-time.
- ESP32 development board
- LED
- Resistor (appropriate value for LED)
- Breadboard and connecting wires
- Arduino IDE with ESP32 board support installed.
- Basic knowledge of electronics and programming.
- Connect the LED to GPIO 27 of the ESP32 with a series resistor.
- Ensure the ESP32 is powered and connected to your computer for programming.
- Clone this repository:
git clone https://github.com/your-username/esp32-led-brightness-control.git
- Open the project in Arduino IDE.
- Update the WiFi credentials in the code:
const char* ssid = "YOUR_SSID"; const char* password = "YOUR_PASSWORD";
- Upload the code to your ESP32.
- After uploading the code, open the Serial Monitor to check the connection status.
- Once connected to WiFi, the ESP32's IP address will be displayed in the Serial Monitor.
- Open a web browser and navigate to the displayed IP address.
- Use the slider on the web page to adjust the LED brightness.
- WiFi Setup: Connects the ESP32 to a specified WiFi network.
- Web Server: Hosts a web page with a slider for brightness control.
- LED Control: Uses PWM to adjust the LED brightness based on slider input.
- WiFi Connection Issues: Ensure the SSID and password are correct and that the ESP32 is within range of the WiFi network.
- Web Page Not Loading: Check the IP address displayed in the Serial Monitor and ensure your device is on the same network.
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to contribute to this project by submitting issues or pull requests!
