Welcome to the Radar System project repository! This project combines Python, Arduino, and an ultrasonic sensor to create a radar-like system that detects and displays the presence of objects in its vicinity. This README file provides an overview of the project and instructions on how to set it up and use it.
- Detects objects using an ultrasonic sensor
- Displays the detected objects on a graphical interface using OpenCV
- Provides real-time information about the objects' distance and position
- Adjustable scanning range and rotation speed
- Supports data logging for further analysis
To get started with the Radar System, follow these steps:
- Python 3.x installed (https://www.python.org/downloads/)
- Arduino IDE installed (https://www.arduino.cc/en/software)
- Required Python packages:
pyserial
,opencv-python
,numpy
- Connect the ultrasonic sensor to the Arduino board following the manufacturer's instructions.
- Connect the Arduino board to your computer using a USB cable.
- Clone or download this repository to your local machine.
- Open the Arduino IDE and upload the
Arduino_Radar.ino
sketch from thearduino
directory to your Arduino board. - Install the required Python packages by running the following command:
pip install pyserial opencv-python
- Open a terminal or command prompt and navigate to the project directory.
- Clone the repo:
git clone https://github.com/MAzewail/Radar-System-Python-Arduino.git
- Navigate to the project directory:
cd Radar-System-Python-Arduino
- Check the Port before running the code and edit the COM in the line # 35
- Run the Python script using the following command:
python Radar_Graph_File.py
- The radar system interface will open, displaying the scan area and detected objects in real-time using OpenCV.
- Adjust the scanning range and rotation speed as desired by modifying the corresponding variables in the Python script.
- Press Ctrl+C in the terminal or command prompt to stop the program.
If you want to log the detected object data for further analysis, follow these steps:
- Create a
data
directory within the project directory. - Uncomment the lines related to data logging in the
Radar_Graph_File.py
script. - Run the script as described in the "Usage" section.
- The detected object data will be logged to a CSV file in the
data
directory.
Contributions to this project are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
This project is licensed under the MIT License. Feel free to use, modify, and distribute the code as permitted by the license.
If you have any questions or feedback, please feel free to contact me.
We hope you find this Radar System project both interesting and useful! Thank you for your interest and support.
Happy coding!