Code Monkey home page Code Monkey logo

pubnub-rpi-smart-parking's Introduction

Smart Parking App with RaspberryPi and PubNub C-Core SDK

Smart Parking System based on Raspberry Pi and PubNub for providing realtime updates on parking availability using the PubNub C-Core SDK.

##OVERVIEW This project demonstrates how we can build an application on Raspberry Pi which can control a set of HC-SR04 ultrasonic sensors,via ATMega8 chip to detect the availability of a parking slot and update this information on a mobile app using the PubNub's realtime data stream network. This application makes use of the new PubNub C-Core SDK on the device side and Javascript client SDK on the mobile app.

##INTRODUCTION This application is assumed to be installed in a public parking space where each parking slot is monitored using a HC-SR04 ultrsonic sensor connected to ATMega8 and ATMega8 connected with a Raspberry Pi via the UART interface.

Refer Circuit Diagram

The application has three parts

  1. Master Controller / RPi-Server - This is the master controller module which runs on raspberry pi (model b+). It periodically get the status of parking slots within its jurisdiction, via UART communication from ATMega8.

  2. Device Controller - This is the sensor controller module which runs on ATMega8. The ATMega8 directly interfaces with ultrasonic sensors to detect the presence or absence of a vehicle in a parking slot and updates this status periodically to master controller.

  3. Mobile App - This is a cordova based simple mobile app which displays a map of the entire parking lot with color coded status indicators. It provides an instant update to the driver about the current availablity of free parking slots.

##BUILD AND INSTALL Refer Build and Install steps

##WORKING

  1. Power up the hadrware setup and make sure that Raspberry Pi has access to internet.

  2. Make sure that the ultrasonic sensors are not obstructed

  3. Launch the mobile app and check that the initial status of the parking slots is green to indicate that all slots are free.

  4. Obstruct one or more ultrasonic sensors with a object to simulate the presence of a vehicle.

  5. Observe the display of mobile app. After a few seconds the color for the corrosponding slot numbers should turn red to indicate that the slots have been occupied.

  6. If the mobile app indicates grey status for any of the parking slot then this means that the sensor has a fault or is malfunctioning and the slot is currently unavailable. This can simulated in ultrasonic sensor by blocking the trigger signal or blocking the reception of echo.

pubnub-rpi-smart-parking's People

Contributors

suryasundarraj avatar shyampurk avatar aksanoble avatar

Watchers

James Cloos 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.