Giter Site home page Giter Site logo

mqttapp's Introduction

Smart Parking System

To park in our parking system, all we need to do is scan our student ID (IITG) card. We’re alloted a slot which gets activated on a press of a button on our phone. Seamless locking system locks the cycle automatically as soon as the cycle is inserted in the alloted slot. The Intelligent anti-theft system ensures the safety of your cycle, so you don’t have to worry at all. And of course, the new smart parking provides support to your cycle, so situations like the one above, doesn’t arise.

Installation

Install paho-mqtt

Install mosquitto to run python scripts for wireless communication

pip install paho-mqtt sudo apt-get install mosquitto

Add this library of digital light sensor to arduino IDE.

Connect the sensors to the Arduino mega 2560 as follows

  1. Connect Base Sheild to the arduino.
  2. Buzzer to A0
  3. Digital light sensor to I2C
  4. RFID
  5. +5 to Vcc of arduino board
  6. GND to GND of arduino
  7. TXD to RX1 of arduino
  8. Laser KY08
    • to GND of arduino
  9. S to Pin 22 of arduino
  10. middle left unconnected.
  11. Ultrasonic sensor
  12. GND to GND of arduino
  13. +5 to Vcc of arduino
  14. Trigger to 12
  15. Echo to 11
  16. LCD display
  17. Servo motor (Lock)
  18. Vcc to positive terminal of a battery 4.5V battery
  19. GND to negative terminal of battery
  20. servo pin to pin 6 of arduino
  21. Connect WiFi adapter to raspi

Follow the following steps to get the system running

  • Upload final_ardm.ino on arduino Mega 2560
  • Connect Arduino to Raspberry Pi
  • Connect Pi to a WiFi network of your own
  • SSH to the Raspberry Pi and
  • Run parking.py on Raspberry Pi
  • Pi will be used as broker too. Hence IP of Pi needs to be changed in mqtt_publisher.py and mqtt_subsriber.py

Hard Coded Values

We have created these scripts for just one slot. and two other demo slots created using LEDs simulating motor and laser on that port. To increase number of slots just connect correct sensors to remaining slots of arduino and add them to motor_port.txt, laser_port.txt and

mqttapp's People

Contributors

yagyanshbhatia avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.