Skip to content

This project demonstrates how to control a two-wheel robot remotely using: ESP32 → Drives motors via L298N motor driver. Raspberry Pi 2W → Acts as a controller, relays commands via UART. Flask Web App → Provides a simple web interface with buttons for motion control.

License

Notifications You must be signed in to change notification settings

sujan-coder/ESP32-Raspberry-Pi-2W-Remote-Bot-Control-via-Flask-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ESP32-Raspberry-Pi-2W-Remote-Bot-Control

This project provides a simple web interface to control motor-driven robot connected to a Raspberry Pi with custom 3D printed model. The communication between the web server and the motor driver happens through UART using Python.

WhatsApp Image 2025-11-30 at 17 36 49_c4515a21

The interface is built using Flask, and you can control the bot through buttons on a webpage. The project is intended for local network control.

WhatsApp Image 2025-11-30 at 17 41 56_95542f95

Hardware Used

  • Raspberry Pi (Python Flask Web Server)

  • ESP32 (Motor Driver Control using UART)

  • L298N Motor Driver

  • Web UI (Forward, Back, Left, Right controls)

The project works inside your local Wi-Fi network and can be accessed from:

  • Mobile/PC phone browser

  • SSH terminal (for starting Flask server)

Software Dependencies

Install required packages:

sudo apt update
sudo apt install python3 python3-pip
pip3 install -r requirements.txt

Enable ssh for Raspberry Pi

sudo raspi-config
image

Interface Options -> I1 SSH -> Enable

Commaands to check the GPIO pins & board details

pintest
ps aux | grep python
pinout

Commuite to your project folder Create a Virtual environment for the folder name venv

  • keeps the Python project library isolated
  • Avoid messing with systems built in python
python3 -m venv venv

Switch terminal to use virtual environment (while running the project)

source venv/bin/activate

Program Esp32 with the motor driver create directory and run the code in Pi

nano interface_code.py
python interface_code.py
(venv) Pi@raspi:~/esp_bot $ python robot_server.py 
 * Serving Flask app 'interface_code'
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:8080
 * Running on http://192.1x8.0.1x0:8080
{D5275583-3820-4D74-B8F1-101937BAB4CB}

Note

  • This project is ment for local useage only.
  • No tunneling was used
  • Learning Flask + UART + Raspberry Pi basics

About

This project demonstrates how to control a two-wheel robot remotely using: ESP32 → Drives motors via L298N motor driver. Raspberry Pi 2W → Acts as a controller, relays commands via UART. Flask Web App → Provides a simple web interface with buttons for motion control.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published