Skip to content

Green Mile is a smart system which monitors fill level of dustbin using IoT sensors and gives an optimized route to garbage truck drivers passing through all the dustbins with 60% or above fill level and the dustbin which hasn't been picked since 3 days using Google Maps Apis.

Notifications You must be signed in to change notification settings

shreyshreyansh/GreenMile

Repository files navigation

GreenMile

Green Mile is a smart system which monitors fill level of dustbin using IoT sensors and gives an optimized route to garbage truck drivers passing through all the dustbins with 60% or above fill level and the dustbin which hasn't been picked since 3 days using Google Maps Apis.

WEBSITE

Various GIF of the website.

  • Landing Page
  • Map Page
  • Mainframe Page

Requirements

  • Node and npm
  • MongoDB: Make sure you have your own local or remote MongoDB database
  • Robo 3T: A UI to manage your database.
  • Hyper: A terminal to run the javascript.
  • VS Code: An ide to write your code.
  • Git Bash: Hyper terminal uses git bash.

Installation Steps

  1. Install Node.js (I am assuming you are on windows).
    • Download the Windows installer from the Nodes.js® web site.
    • Choose the LTS version that’s shown on the left.
    • Run the installer (the .msi file you downloaded in the previous step.)
    • Follow the prompts in the installer (Accept the license agreement, click the NEXT button a bunch of times and accept the default installation settings).
    • Restart your computer. You won’t be able to run Node.js® until you restart your computer.
    • Confirm that Node has been installed successfully on your computer by opening cmd and typing in the commands node --version
  2. Installing the Git Bash
    • Download Git Bash
    • You can tick the box to add a Desktop icon in the installation Wizard.
    • Select Use Vim
    • Use OpenSSH
    • Use OpenSSL
    • Checkout Windows-style
    • Use MinTTY
    • Enable File System cashing and the Credential Manager
    • Leave the experimental features unchecked and click install.
    • Once it's done, just check the Launch Git Bash option and click Finish.
  3. Installing the Hyper terminal
    • Download Hyper
    • After download open Hyper and click the top left icon Edit->Preferences. hyper.js will open and delete everything and replace it with this.
    • To confirm that installation is successful give echo $SHELL command in hyper and the output should be \bin\bash.
  4. Installing MongoDB
    • Download MongoDB as per the given config:
    • Install MongoDB and keep a note of the Data Directory link:
    • Click next and uncheck Install MongoDB Compass and click next and finish the installation.
    • Go to C:\ and make a folder name data and inside that make a folder name db C:\data\db
    • Now we need to create two shortcut for mongo.exe and mongod.exe for hyper terminal:
      • Open Hyper and commands:
        • cd ~
        • touch .bash_profile
        • vim .bash_profile
      • Now press i key which will start INSERT mode in vim for hyper.
      • Paste alias mongod="/c/Program\ files/MongoDB/Server/4.0/bin/mongod.exe" alias mongo="/c/Program\ Files/MongoDB/Server/4.0/bin/mongo.exe" {Note : replace 4.0 with the current version of mondoDB installed} and write :wq!.
  5. Install mongo 3T and make a greenmileDB database with these collections:
    • driverinfos
    • driverlogins
    • dustbins
  6. Configuring the IoT device:
  7. SetUp Google Billing A/C in google cloud console and setup your project in it to get the API related to Direction API and Maps JavaScript API.
  8. Setup a Thingspeak IoT Cloud account.
    • Go to Channel and create a new channel
    • Make the channel public and note the write API command so that you can use in the String API key in NODEMCU_DATA_UPLOAD.ino.
  9. Clone the repository: [email protected]:shreyshreyansh/GreenMile.git
  10. Open the repository in VS code.
  11. Install the application: npm install in hyper.
  12. Start the server: node index.js
  13. View in browser at http://localhost:3000

Good Luck!

About

Green Mile is a smart system which monitors fill level of dustbin using IoT sensors and gives an optimized route to garbage truck drivers passing through all the dustbins with 60% or above fill level and the dustbin which hasn't been picked since 3 days using Google Maps Apis.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published