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.
Various GIF of the website.
- 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.
- 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
- 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.
- Installing the Hyper terminal
- 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 namedata
and inside that make a folder namedb
C:\data\db
- Now we need to create two shortcut for
mongo.exe
andmongod.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!
.
- Open Hyper and commands:
- Install mongo 3T and make a
greenmileDB
database with these collections: - Configuring the IoT device:
- Things Required:
- Circuit image:
- SetUp Google Billing A/C in google cloud console and setup your project in it to get the API related to
Direction API
andMaps JavaScript API
. - 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.
- Clone the repository:
git@github.com:shreyshreyansh/GreenMile.git
- Open the repository in VS code.
- Install the application:
npm install
in hyper. - Start the server:
node index.js
- View in browser at
http://localhost:3000
Good Luck!