YusofBandar / Project-CAD

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/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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.

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

License:MIT License


Languages

Language:TypeScript 69.4%Language:HTML 12.3%Language:Python 8.3%Language:CSS 8.1%Language:JavaScript 1.8%