GithubHelp home page GithubHelp logo

yusofbandar / project-cad Goto Github PK

View Code? Open in Web Editor NEW

This project forked from air92/project-cad

0.0 1.0 0.0 15.35 MB

The project is to allow people to see how much pollution people are come into contact with their daily commutes to and from work or other journeys. The reasoning behind this project to is ensure people are aware of the effects of pollution as people don't pay as much attention to negative effects.

Home Page: http://digitallabs.mmu.ac.uk/air-92-student-live-project-interview/

License: MIT License

TypeScript 69.42% HTML 12.33% CSS 8.14% JavaScript 1.76% Python 8.34%

project-cad's Introduction

Air92

The project is to allow people to see how much pollution people are come into contact with their daily commutes to and from work or other journeys. The reasoning behind this project to is ensure people are aware of the effects of pollution as people don't pay as much attention to negative effects.

Getting Started

These instructions will get you a copy of the project up and running on your Raspberry Pi, phone and backend for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

src contains the code needed for the Application and Raspberry Pi

Documents contains records of the production process

The Final Product

Prerequisites

Application

To deploy the application you will need Node, Cordova, Angular and Ionic.

Raspberry Pi

To deploy the sensors you will need a Raspberry Pi 3.

Sensors

Additional Equitment

Installing

Application

To install the application packages you will need npm, comes with Node installation

Node

Download Node from https://nodejs.org/en/download/ for you OS

node --version

Cordova

npm install -g cordova
cordova --version

Angular

npm install angular

Ionic

npm install -g ionic
ionic info

Sensors

First install the latest version of Rasbian OS onto the Raspberry Pi.

Once Rasbian is installed Grove Drivers need to be installed.

Grove Drivers

sudo curl -kL dexterindustries.com/update_grovepi | bash
sudo reboot

Attach the Grove Sensors corresponding to the diagram below.

Deployment

Application

Android

To deploy the application open the cmd (windows) or terminal (linux) and navigate to Project-CAD/Air92 App/Version 0/Air92/src/

Connect android phone to Computer and Enable Debugging

Then run ionic cordova run android --device


IOS

First you have to create a Apple Provisioning Profile

Using an Apple ID

  • Open Xcode preferences (Xcode > Preferences…)
  • Click the ‘Accounts’ tab
  • Login with your Apple ID (+ > Add Apple ID…)

Running Your App

  • Run a production build of your app with ionic cordova build ios --prod
  • Open the .xcodeproj file in platforms/ios/ in Xcode
  • Connect your phone via USB and select it as the run target
  • Click the play button in Xcode to try to run your app

Sensors

Bluetooth

Before running the sensors bluetooth needs to be configured. First bleno needs to be installed

Bleno

sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev

Bluetooth Client Configuration

Navigate to bleclientV2.js find line 20 and 55.

var pythonProcess = spawn ("python",[PATH_TO_BLUELED]); change PATH_TO_BLUELED to the absolute path of blueLED.py

var pythonProcess = spawn ("python",[PATH_TO_SENSOR_DATA]); and change PATH_TO_SENSOR_DATA to the absolute path of SensorData.py


Testing Sensors

Navigate to SensorTest.py.

sudo python SensorTest.py
reboot

No errors should show


Running Sensors

Navigate to bleclientV2.js.

sudo node bleclientV2.js

The application will automatically connect to the Raspberry Pi and poll for sensor data.


Running Particulate Sensor

Attach the Particulate Sensor corresponding to the diagram below.

Navigate to serialV2.py

sudo python serialV2.py

Built With

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Papa Johns for Keeping us going

project-cad's People

Contributors

yusofbandar avatar abd-assamadachouri avatar naimahmed avatar faranazadi avatar alicedigitallabs 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.