Skip to content

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.

License

Notifications You must be signed in to change notification settings

Air92/Project-CAD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published