An ESP32-powered interactive LED oil lamp controller designed for the CRE8X 2.0 logo.
The system creates its own Wi-Fi hotspot and hosts a rich, underwater-themed web interface that allows users to control seven LED segments (C-R-E-8-X-2-0) in real time.
LED states are persistently stored, ensuring the lamp restores its previous state after power loss β perfect for exhibitions, installations, and interactive displays.
- π Standalone Wi-Fi Access Point (no router required)
- π Web-based Control Panel (User & Admin modes)
- π Animated Underwater UI (HTML/CSS/JS)
- β‘ 7-Channel Relay Control for high-power LED strips
- πΎ State Persistence using ESP32 Flash (Preferences)
- π Real-time Updates without page refresh
- π± Mobile & Desktop Compatible
- π¨ Individual LED segment control for each character
- ESP32 boots and creates a Wi-Fi Access Point
- User connects via phone/laptop to
CRE8X-OilLampnetwork - Web UI is served directly from ESP32
- Button clicks send HTTP requests to toggle relays
- LED states are automatically saved to flash memory
- On reboot, previous LED states are restored automatically
| Component | Description |
|---|---|
| ESP32 Dev Board | Main controller (ESP-WROOM-32 or similar) |
| 7-Channel 5V Relay Module | Controls 12V LED segments |
| 12V LED Strip | Cut into 7 segments (one per character) |
| 12V Power Supply | Adequate current rating (5A+ recommended) |
| Jumper Wires | For connections |
| Common Ground | Critical: ESP32 + Relay + Power Supply must share GND |
| Character | GPIO Pin |
|---|---|
| C | GPIO 13 |
| R | GPIO 12 |
| E | GPIO 14 |
| 8 | GPIO 27 |
| X | GPIO 26 |
| 2 | GPIO 25 |
| 0 | GPIO 32 |
ESP32 GPIO 13 β Relay 1 (IN1)
ESP32 GPIO 12 β Relay 2 (IN2)
ESP32 GPIO 14 β Relay 3 (IN3)
ESP32 GPIO 27 β Relay 4 (IN4)
ESP32 GPIO 26 β Relay 5 (IN5)
ESP32 GPIO 25 β Relay 6 (IN6)
ESP32 GPIO 32 β Relay 7 (IN7)
ESP32 5V β Relay VCC
ESP32 GND β Relay GND
12V Power (+) β Relay COM (Common)
Relay NO β LED Strip (+)
LED Strip (β) β 12V Power (β)
β οΈ Important:
- ESP32 and 12V power supply must share a common ground
- Use NO (Normally Open) terminals on relays
- Double-check polarity before powering on
- Ensure adequate wire gauge for LED current
| Setting | Value |
|---|---|
| SSID | CRE8X-OilLamp |
| Password | None (Open Network) |
| ESP32 IP | 192.168.4.1 |
| Gateway | 192.168.4.1 |
| Subnet | 255.255.255.0 |
- Arduino IDE (1.8.x or 2.x)
- ESP32 Board Support installed
- Required libraries:
WiFi.h(included with ESP32 core)WebServer.h(included with ESP32 core)Preferences.h(included with ESP32 core)
-
Install ESP32 Board Support
- Open Arduino IDE
- Go to
File > Preferences - Add to "Additional Board Manager URLs":
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - Go to
Tools > Board > Boards Manager - Search for "ESP32" and install
-
Clone/Download This Repository
git clone https://github.com/godragun/CRE8X-2.0---Interactive-LED-Oil-Lamp-Controller.git
-
Open the Sketch
- Open the
.inofile in Arduino IDE
- Open the
-
Select Board & Port
Tools > Board > ESP32 Dev ModuleTools > Port > [Your ESP32 COM Port]
-
Upload
- Click the Upload button
- Wait for "Done uploading" message
-
Monitor Serial Output (Optional)
Tools > Serial Monitor(115200 baud)- Verify the ESP32 is creating the Access Point
URL: http://192.168.4.1/
Features:
- π¨ Beautiful underwater-themed animated background
- π 7 toggle buttons for each character (C-R-E-8-X-2-0)
- π’ Visual feedback showing ON/OFF states
- π± Responsive design for mobile and desktop
- π Smooth CSS animations
URL: http://192.168.4.1/admin
Additional controls:
- π Master Reset - Turn all LEDs OFF
- β‘ Quick Patterns - Preset lighting configurations
- π§ System Status - View ESP32 info and uptime
- Power on the ESP32
- Connect to Wi-Fi:
- Open Wi-Fi settings on your device
- Connect to
CRE8X-OilLamp(no password)
- Open Web Browser:
- Navigate to
http://192.168.4.1/
- Navigate to
- Control LEDs:
- Click individual character buttons to toggle LEDs
- LED states are saved automatically
- Admin Features:
- Visit
/adminfor advanced controls
- Visit
Edit in the code:
const char* ssid = "CRE8X-OilLamp"; // Change SSID here
const char* password = NULL; // Set password (or keep NULL for open)Update the pin definitions:
const int pinC = 13; // Change GPIO pins as needed
const int pinR = 12;
// ... etcThe HTML/CSS/JS is embedded in the sketch. Look for the handleRoot() function and modify the HTML string.
| Problem | Solution |
|---|---|
| Can't find Wi-Fi network | Check serial monitor; verify ESP32 booted successfully |
| LEDs don't turn on | Verify relay wiring; check 12V power supply; test relay manually |
| LEDs flicker | Ensure common ground; use adequate power supply |
| Web page won't load | Confirm connection to CRE8X-OilLamp; try 192.168.4.1 |
| State not saving | Check serial monitor for flash errors; ensure proper ESP32 partition scheme |
| Relays stuck ON | Check GPIO pin assignments; verify relay module is 5V compatible |
Note: Add photos/videos of your setup here!

- Add color-changing RGB LED support
- Implement animation patterns (fade, pulse, chase)
- Mobile app integration
- MQTT support for IoT integration
- Voice control (Alexa/Google Assistant)
- Brightness control via PWM
This project is open-source and available under the MIT License.
Godragun
GitHub: @godragun
Original Design Credits: @dinethmeditha
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
If this project helped you, please give it a β!
For questions or support, please open an issue on GitHub.
Happy Building! π₯β¨

