2WD Web-Controlled Robot
A simple 2-wheel-drive robot powered by an ESP8266 (NodeMCU) that can be controlled directly from a web browser.
The project hosts a built-in web server with on-screen control buttons and sends movement commands to the motors using standard HTTP requests.
- Control robot from any browser (PC / phone)
- Press and hold buttons for real-time control
- Simple HTML + JavaScript web UI
- Uses basic HTTP requests (no external libraries needed)
- Easy to modify and extend
- MCU: ESP8266 (NodeMCU)
- Motor Driver: L293D or TB6612FNG
- Motors: 2× DC gear motors
- Power: 2S Li-ion or 12V DC
- Connections:
- IN1 → D5 (GPIO14)
- IN2 → D6 (GPIO12)
- IN3 → D7 (GPIO13)
- IN4 → D8 (GPIO15)
- ENA / ENB → Tied HIGH (always enabled)
- The ESP8266 connects to your Wi-Fi network using SSID and password.
- It hosts a simple webpage with direction buttons.
- When a button is pressed, the browser sends a request like
/move?dir=forward. - The ESP8266 sets motor pins accordingly (HIGH/LOW) to move the robot.
- Releasing the button sends
/move?dir=stop, halting the motors.
- Update your Wi-Fi credentials in the code.
- Wire up the motor driver and power the board.
- Flash the sketch to your ESP8266.
- Open the Serial Monitor to get your robot’s IP address.
- Visit that IP in a browser (e.g.,
http://192.x.x.x) and drive.
Want to improve this project? Contributions are welcome!
- Fork this repository
- Edit the code or docs
- Submit a Pull Request
This project is open-source under the MIT License.
Feel free to use, modify, and build upon it.
