GARBAGE LEVEL DATA NOTIFYING THROUGH GSM AND SENDING DATA THROUGH WIFI TO RASPBERRY SERVER

In ‘Intelligent dustbins for smart cities’,the level ofgarbage in the dustbins is detected with thehelp of multiple IR Sensors. An RFID tag is provided to each dustbin. GPS is used to track current location of the dustbins Arduino is used to interface the sensor system, GPS with GSM system. A GUIis also developed to monitor the desiredinformation related to the garbage fordifferent selected locations. This will help tomanage the garbage collection efficiently. GSM module is used for communicationpurpose, to send message to the controlroom when the container is full. The output of level detector isgiven to the microcontroller. The ATcommands are used to facilitate themessaging service through the GSMModule. This program is burned in the microcontroller with the help of Arduinosoftware (IDE). These messages consist of information of garbage levels of respectivedustbins. Depending on the information sent to control room, the authority informs theconcern person of the respective area about garbage level. Then the concerned personmakes sure that the garbage of that particular area is collected as soon as possible. In addition to all this we make use of Wi-Fi module to send the entire information to the Raspberry Pi which is used as a server. The Wi-Fi module is also interfaced to the Arduino.

SCHEMATIC
IMPLEMENTATION

The IR sensors, GPS and GSM are interfaced with the Arduino. The Rx and TX of GSM and GPS are given to the TX and RX of Arduino. The sensors require 5v power and the GSM and GPS require 3.3 V. An adaptor is provided to the GSM for further power. The output of these modules is given to the Wi-Fi module which transfers the information to the Raspberry Pi server using AT commands. This data gets updated on the webpage.

HARDWARE DESCRIPTION

Hardware Tools

The IOT device consists of Arduino UNO, IR sensors, GPS, GSM, and Wi-Fi module. These combined modules altogether spontaneously notify the authority whenever the dustbin is full and requires to be cleaned.It pinpoints the exact location, and sends a message via GSM to the concerned authority along with its level. Further information can be sent via Wi-Fi module to the GUI.Some of the hardware tools required are mentions below along with its working

Arduino UNO

IR SENSORS

GPS

GSM

WIFI MODULE

RASPBERRY PI

SOFTWARE DESCRIPTION

Software Tools:

Arduino IDE

PYTHON

Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming.

Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.

The Python interpreter and the extensive standard library are freely available in source or binary form for all major platforms from the Python Web site, https://www.python.org/, and may be freely distributed. The same site also contains distributions of and pointers to many free third party Python modules, programs and tools, and additional documentation.X

The Python interpreter is easily extended with new functions and data types implemented in C or C++ (or other languages callable from C). Python is also suitable as an extension language for customizable applications.

This tutorial introduces the reader informally to the basic concepts and features of the Python language and system. It helps to have a Python interpreter handy for hands-on experience, but all examples are self-contained, so the tutorial can be read off-line as well.

For a description of standard objects and modules, see The Python Standard Library. The Python Language Reference gives a more formal definition of the language. To write extensions in C or C++, read Extending and Embedding the Python Interpreter and Python/C API Reference Manual. There are also several books covering Python in depthX

Build a Python-powered web server with Flask

Install the lightweight web framework Flask and set up a basic web server with different pages, using Python, HTML, and CSS.

Installing Flask

First you’re going to install the Flask package. Make sure you are connected to the internet, either by Ethernet cable or WiFi before you start.

1. Start by opening a Terminal window from the taskbar or applications menu

Now install Flask by typing

sudo apt-get install python3-flask

Building a basic Flask web application

Now you’re going to set up a basic web application with Flask and Python. You will be able to run a single web page and display some text on a web browser.

  1. Open the File Manager and create a new folder for your project.
  2. Open Python 3 from the main menu.
  3. Open a new window by clicking File > New file , and save this as app.py inside the project folder you created.
  4. You’ll write your application code here and when you run your code, any printed messages or errors will be shown in the Python shell window which opened first.
  5. Now enter the following lines into the blank app.py window:
  6. from flask import Flask
  7. app = Flask(__name__)
  8. @app.route(‘/’)
  9. def index():
  10. return’Hello world’
  11. if __name__ ==’__main__’:

Add HTML templates to your web app

Next, you’ll modify your existing routes to return full HTML templates, rather than simple text strings.

  1. Open the File Manager and create a new folder for your project.
  2. Open Python 3 from the main menu.
  3. Open a new window by clicking File > New file , and save this as app.py inside the project folder you created.
  4. You’ll write your application code here and when you run your code, any printed messages or errors will be shown in the Python shell window which opened first.
  5. Now enter the following lines into the blank app.py window:
  6. from flask import Flask
  7. app = Flask(__name__)
  8. @app.route(‘/’)
  9. def index():
  10. return’Hello world’
  11. if __name__ ==’__main__’: