This is a project for Capstone Design course at Sogang university (CSE4186 & CSE4187)
Our team's goal was to create IoT-based smart trash bin service.
You can check more detailed information about this project in the following URLs.
- wiki page for CSE4186: http://bit.ly/2pcq3tL
- wiki page for CSE4187: http://bit.ly/2Am8JHR
The project consists of the following components.
-
Arduino code that collects data(distance to objects in trash bin) measured from sonar sensor attached to Nodemcu.
After collecting them, it calculates the the amount of trash in trash bin and sends it to Node.js server. [file: trash_bin.ino] -
Web application
2.1 Javascript code that receives data from trash_bin.ino and stores in MySQL database. [file: send.js]
2.2 Javascript code that reads recent data for each trash bin from database and visualize how much each trash can is filled in. [file: main.js] -
Android application
Android project code(written in Java) that perform the following jobs.- Gets images of target indoor buildings from users.
- Visualizes smart bins located on the positions specified initially by the users.
That is, the app shows images of colored smart bins in particular position according to how much they are filled.
To do that, the system reads data from MySQL database periodically and draws bitmaps on the display.
The color of the smart bins is determined by the amount of trash in the smart bin:- the amount of trash < 50% of the bin: green
- the amount of trash < 70% of the bin: yellow
- otherwise: red
For further explanations, please refer to [smart-bin] directory
-
Arduino code
- If you do not have Arduino Sketch, download it at https://www.arduino.cc/en/Main/Software
- Execute Arduino Sketch > Add trash_bin.ino on its project
- Make sure that you specify a non-overlapping port number
- Connect Nodemcu to your PC > Run trash_bin.ino
-
Web application
- Install Node.js and all its related frameworks.
- Execute send.js by typing in "node send.js"
- Execute main.js by typing in "node main.js"
- Then, you can check the result on web page.
-
Android application
- Install the latest version of Android Studio.
- Download smart-bin directory from this git repository.
- Open smart-bin directory on Android Studio.
- Run the project.