This project is a Python-based controller for an RC Car raspberry project. It uses Flask and SocketIO to handle real-time communication between the web-based controller application and the vehicle (via Raspberry GPIO). The application receives simple joystick data and processes it to control the vehicle's movement.
- Real-time vehicle control
- Easy-to-use web interface
- Lightweight Flask server
- SocketIO for efficient client-server communication
Before you begin, ensure you have met the following requirements:
- Python 3.x installed
- Pip for Python package management
- Clone the repository:
git clone https://github.com/mrstroz/raspberry-rc-car-controller.git
- Navigate to the project directory:
cd raspberry-rc-car-controller
- Install Python 3 and pip. Python 3 is usually pre-installed on Raspberry Pi. You can check your Python version with:
python3 --version
- Create a Virtual Environment with:
python3 -m venv ./.venv
- Activate the Virtual Environment:
source ./.venv/bin/activate
- Install the required Python packages:
pip install flask python-socketio python-dotenv
- Copy .env.example file into .env
cp .env.example .env
To run the server, use the following command:
python main.py
Once the server is running, open a web browser and navigate to http://127.0.0.1:5000 or to http://[your-raspberry-ip]:5000 to access the control interface.
To see your Raspberry PI IP address, type hostname -I