Skip to content

Air quality sensor controlled by cloud dashboard

Notifications You must be signed in to change notification settings

21st-centuryman/II1302

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spafe Monitor

banner

This is a project carried out by Group 5 in II1302 (Spring 2022) at KTH Royal Institute of Technology.

The project

Background

An imaginary customer wants a cloud-based system for monitoring air quality / temperature. They want to be able to put out sensors in different rooms and connect them all to a common service in the cloud, where the data is displayed.

Purpose

The overall purpose of this project is to protect human health and equipment. The product can provide incentives to lower the concentration of harmful gases in the workplace to improve the work environment. The project will also give the group experience in projects and system development.

Goal

The main goal is to develop a functioning system that meets the requirements. Some sub-goals are: a functional sensor module, integration with the cloud and a functioning web interface.

More information about the project can be found at the links below

Members

  • Alexander: Project leader and Environment responsible
  • Johan: Architect
  • Amiran: Developer
  • Bashar: Tester
  • Simon: Requirement responsible

Development

To develop, start by cloning this repository.

Webpage

To develop the webpage, do the following:

  • Install Node and npm.
  • From the root directory, run npm install. This installs all dependencies, including those of the web/ subpackage, into node_modules/.
  • Set up the files web/.env.local (for development), and web/.env.test.local (for testing) with the correct credentials. web/.env.local.example can be used as a template. ⚠ Do not commit your secrets.
  • npm run dev to start a live development server on localhost.
  • Develop. 😎
  • npm test to run all unit tests.
  • The .husky/pre-commit git hook runs Prettier and ESLint on any staged files before every commit.

Hardware

The required hardware is:

  • AZ Envy (+ USB A to micro B cable)
  • FT232RL FTDI USB to TTL adapter (+ USB A to mini B cable)
  • Cables for connecting the programming pins (breadboard optional)

hardware programming

To develop the hardware:

  • Install Arduino IDE.
  • Connect all hardware as shown above. The USB mini B should be connected to your computer.
  • Install any drivers needed. The board should show up on a serial port.
  • Install libraries in Arduino IDE:
  • Select the correct board type in (Tools -> Boards -> ESP8266 Boards -> Generic ESP8266 Module).
  • Select the correct port in (Tools -> Port -> ...).
  • Develop. 😎
  • Use the relevant config.example.h as a template to create a config.h file with correct credentials.
  • To upload the sketch:
    • Click Upload and wait for the Output to write Connecting......
    • Put the board into programming mode:
      • Press and hold down the RESET button, then the FLASH button.
      • Then release RESET and finally release FLASH.
    • After uploading you have to leave programming mode: Press RESET shortly.

Testing

The Webpage is continuosly tested in GitHub Actions. This is the latest status:

Build and Test npm package

About

Air quality sensor controlled by cloud dashboard

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 77.3%
  • C++ 19.1%
  • CSS 1.9%
  • Other 1.7%