Connect the ultrasonic sensor and the bluetooth module according to the configurations in the ultrasonic_with_bluetooth/ultrasonic_with_bluetooth.ino file.
Upload the .ino file to the Arduino and connect it to your computer.
Now configure the software part. Inside the project directory, run the following commands -
virtualenv Trashware
For Windows -
cd Trashware/Scripts && activate
For Linux and Mac -
source Trashware/bin/activate
Now run the Main_Program.py in terminal
If everything went well, then the program will display the ultrasonic sensor readings on the screen. You can also view the sensor readings on your Android or IOS device by downloading an arduino emulator.
If an object is kept in the range of 30 cm in front of the ultrasonic sensor, then the Webcam_Capture.py captures the image through a webcam connected to computer, and the Image_Prediction.py predicts the captured image and classifies it as recyclable or non-recyclable.
If the object is recyclable, then the servo motor turns 45 degree right, dumping it in the recyclable bin. And if the object is non-recyclable, then the servo motor turns 45 degree left dumping it in the non-recyclable bin.
Note - The code for the servo motor will be added in the future commits. Watch the repository for changes.
Share and fork the project if you would like to. Feel free to pull requests and open issues.