Note
This guide is for setting up the project on a Windows machine
.
If you're using a other OS, please contact us for specific instructions.
- Clone the project repository to your local machine.
https://github.com/chamishkadilina/Smart-Plastic-Bottle-Redemption-System.git
- Download Python :
- Visit the official Python website: Python Downloads.
- Download the latest version of Python for Windows.
- Install Python :
- Run the downloaded installer.
- During installation, ensure the following options are selected :
- Use admin privileges when installing py.exe
- Add python.exe to PATH
- This setup ensures that Python and pip commands are recognized in the command prompt.
- Verify Installation :
Open a new command prompt window and type :
python --version
pip --version
- These commands should display the versions of Python and pip installed on your system.
-
To run this project, you'll need to install several Python packages.
(The approximate download size is 500MB) -
Packages :
PySerial
For communication with the Arduino.OpenCV-python
For capturing and processing images.NumPy
For handling arrays and numerical operations.TensorFlow
For loading and using the MobileNetV2 model.
-
To install all required packages open the command prompt and run this :
pip install pyserial opencv-python numpy tensorflow
- We recommend using Visual Studio Code. Download and install it or any other preferred code editor.
- install these VS Code Extensions :
Python
Pylance
Python Debugger
- Download and Install :
-
Visit the official Arduino ide website : Arduino IDE download.
-
Follow a YouTube tutorial if needed to set up the IDE correctly with your Arduino board.
-
Required Arduino libraries
Easy MFRC522
by Pablo SampaioHX711_ADC
by Olav KallhovdLiquidCrystal I2C
by Frank de BrabanderMFRC522
by GithubCommunity
-
- Download and Install :
- Visit the official XAMPP website : Download XAMPP.
- This XAMPP provides a local web server environment for testing and development.
- Launch XAMPP Control Panel:
- Navigate to
C:\xampp\xampp-control
. - Start
Apache
andMySQL
services. - Minimize the control panel. ( Because it needs to remain running in the background. )
- In your web browser, access phpMyAdmin by navigating to
http://localhost/phpmyadmin
. - In phpMyAdmin, create a database named
bottle_db
and a table nameduser_data
with the following columns:- id (INT, PRIMARY KEY, AUTO_INCREMENT)
- name (VARCHAR)
- value (INT)
- Insert example data manually in the
user_data
table to ensure it is functioning correctly. - In your browser, navigate to
http://localhost/display_data.php
to view the inserted data. ( After verifying, delete the manually added data. )
- Prepare Web Resources :
- Go to the
Smart-Plastic-Bottle-Redemption-System
folder, then navigate toProject Files
. - Copy
display_data.php
andwebsite_bg.jpg
paste toC:\xampp\htdocs
.
- Go to the
- In the
Smart-Plastic-Bottle-Redemption-System
folder, go toProject Files\SmartRecycler
. - Open
SmartRecycler.ino
in the Arduino IDE and upload it to your Arduino board.Keep the USB cable connected
as it is required to run the Python script.
- Run Python Script :
- In VS Code, open the project and navigate to
Project Files
. - Run the
arduino_communication.py
file to start the project.
- In VS Code, open the project and navigate to