The ESP32 Serial Clicker is a powerful and versatile tool for automating physical interactions. At its core, it's a servo motor controlled by an ESP32, but its power lies in the sophisticated web interface and robust backend. You can define complex sequences of "clicks" with precise, user-defined time gaps—from seconds to hours.
Whether you need to automate keyboard presses for AFK tasks, conduct long-term product testing, or create timed mechanical interactions for a project, this solution offers a reliable, network-controlled alternative to manual intervention. The intuitive UI and easy WiFi setup mean you can get your automation sequence running in minutes from any device on your network.
- 📱 Modern & Responsive Web UI: A sleek, dark-themed interface built to work flawlessly on your desktop, tablet, or smartphone.
- 🌐 Effortless WiFi Configuration: Features WiFiManager for a pain-free setup. No hardcoded credentials—simply connect to the ESP32's access point on first boot to configure your network.
- ⏱️ Advanced Sequence Programming:
- Define the total number of clicks.
- Set unique time gaps (in hours, minutes, and seconds) before each individual click.
- Specify an initial delay before the first click.
- ⚙️ Real-Time Servo Control: Calibrate the servo's rotation angle directly from the UI to perfectly match your physical setup.
- 📈 Live Status Dashboard: Get instant feedback via WebSockets. The UI provides:
- Current Status:
Idle,Running,Finished, orStopped. - Click Progress: A live count of executed clicks (e.g.,
5 / 100). - Countdown Timer: A precise countdown to the next scheduled click.
- Current Status:
- 👆 On-Demand Configuration Portal: Press a physical button at any time to re-launch the WiFi configuration portal without needing to re-flash the firmware.
- 🔗 Zero-Configuration Networking: Uses mDNS, allowing you to access the web interface via a friendly address like
http://serialclicker.localinstead of hunting for an IP.
| Component | Quantity | Notes |
|---|---|---|
| ESP32 Development Board | 1 | Any model with WiFi will work. |
| Servo Motor | 1 | e.g., SG90 Micro Servo. |
| Momentary Push Button | 1 | For triggering the on-demand WiFi portal. |
| Breadboard | 1 | For prototyping. |
| Jumper Wires | Set | To connect the components. |
| 5V Power Supply (Optional) | 1 | Recommended for stable servo operation. |
Connect the components as follows. Ensure your ESP32 is not connected to USB when wiring to avoid shorts.
| ESP32 Pin | Component | Connection Point |
|---|---|---|
GPIO 13 |
Servo Motor | Signal Pin |
GPIO 0 |
Push Button | One Leg |
GPIO 2 |
Onboard LED | (Internal) |
5V / VIN |
Servo Motor | VCC (Red Wire) |
GND |
Servo Motor | GND (Brown Wire) |
GND |
Push Button | Other Leg |
Note: For best performance, power the servo from a separate 5V power supply, making sure to connect its ground to the ESP32's ground.
Ensure you have the latest version of the Arduino IDE installed with the ESP32 Board Manager. The following libraries must be installed via the Arduino Library Manager (Sketch > Include Library > Manage Libraries...):
WiFiWiFiManagerby tzapuESPAsyncWebServerWebSocketsby Markus SattlerArduinoJsonby Benoit BlanchonESP32ServoESPmDNS
- Clone the Repository: Download the
inofile from this project. - Open in Arduino IDE: Open the main project file.
- Configure Pins: If you wired your components to different pins, update the
#definesection at the top of the code. - Upload: Select your ESP32 board and COM port, then click the "Upload" button.
- Power On: Power the ESP32 via USB or an external supply.
- Connect to the AP: On your phone or computer, search for a new WiFi network named
AutoConnectAPand connect to it. The password ispassword. - Captive Portal: A configuration page should automatically open in your browser. If not, open a browser and go to
192.168.4.1. - Configure WiFi: Click "Configure WiFi", select your home network (SSID), enter your password, and click "Save".
- Restart: The ESP32 will restart and automatically connect to your network. The onboard LED will turn solid
HIGHto indicate a successful connection. - Find the IP: Open the Arduino Serial Monitor at
115200baud to see the IP address, or simply navigate tohttp://serialclicker.localin your browser.
- Access the UI: Open the web interface using the IP address or mDNS hostname.
- Set Parameters:
- Enter the desired Number of Clicks.
- Adjust the Rotation Angle slider to calibrate the servo's movement.
- The time gap input fields will generate automatically. Set the desired delay (Hours, Minutes, Seconds) for each click interval.
- Start Sequence: Click the Start button. The status panel will update in real-time.
- Stop Sequence: Click the Stop button at any time to immediately halt the sequence.
This project masterfully combines several technologies:
- ESPAsyncWebServer: Serves the main HTML, CSS, and JavaScript file that constitutes the user interface.
- WebSockets: Creates a persistent, two-way communication channel between the web browser and the ESP32. This allows the server to push status updates (like countdowns and click counts) to the client instantly without requiring the page to be reloaded.
- ArduinoJson: Efficiently parses JSON data sent from the web UI (start/stop commands, angle, time gaps) and serializes status data to be sent back to the UI.
- WiFiManager: Simplifies network setup by handling WiFi credential storage in the ESP32's non-volatile memory, eliminating the need to hardcode them. The on-demand trigger on
TRIGGER_PINprovides a user-friendly way to reconfigure networking if the environment changes.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
All the right goes to Md Mahbubur Rahman.

