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.
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
To deploy the application you will need Node, Cordova, Angular and Ionic.
To deploy the sensors you will need a Raspberry Pi 3.
- Grove Pi Board
- Mulitchannel Gas Sensor
- DFRobot PM2.5 laser dust sensor
- Temperature&Humidity Sensor
- Light Sensor
To install the application packages you will need npm
, comes with Node
installation
Download Node from https://nodejs.org/en/download/ for you OS
node --version
npm install -g cordova
cordova --version
npm install angular
npm install -g ionic
ionic info
First install the latest version of Rasbian OS onto the Raspberry Pi.
Once Rasbian is installed Grove Drivers need to be installed.
sudo curl -kL dexterindustries.com/update_grovepi | bash
sudo reboot
Attach the Grove Sensors corresponding to the diagram below.
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
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
Before running the sensors bluetooth needs to be configured. First bleno needs to be installed
sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev
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
Navigate to SensorTest.py.
sudo python SensorTest.py
reboot
No errors should show
Navigate to bleclientV2.js.
sudo node bleclientV2.js
The application will automatically connect to the Raspberry Pi and poll for sensor data.
Attach the Particulate Sensor corresponding to the diagram below.
Navigate to serialV2.py
sudo python serialV2.py
- Abd-Assamad Achouri - Project manager - Achouri12
- Yusof Bandar - Technical lead - YusofBandar
- Evans Mensah Adeenu - Team member - emAdeenu
- Naim Ahmed - Team member - NaimAhmed
- Faran Azadi - Team member - FaranAz96
- Hamza Asif - Team member - Repjaws
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
- Papa Johns for Keeping us going