Git Product home page Git Product logo

mhz19b's Introduction

Summary

Test application for playing with Chineze carbon dioxide sensor MH Z19B from Aliexpress. It allows to read data from the sensor connected via serial interface, acquire PPM and temperature, persisit mentioned metrics on disk and visualize results on the chart with enabled real-time updates.

Application is written on javascript and consists of two separate modules communicating with each other:

  • Sensor agent - sensor UART client which polls sensor each N seconsds and stores received amount of CO2 PPM into persistent database
  • Web UI - http server which handles web UI for viewing chart with collected statistics

Screenshots

console gui

Steps to launch

  • Connect sensor with serial adaptor
  • Connect adaptor with the machine
  • Discover serial device name in your OS
  • Set actual name via UART_ADAPTER constant in constants.js
  • Launch client app with yarn mh (or if you prefer npm mh)
  • Launch http server with DEBUG=* yarn server (or npm server)
  • Head your browser to http://localhost:8888

Requirements

  • Hardware platform which may run nodejs (tested on 8.3.0)
  • Sensor module itself
  • USB to UART converter with support of 3.3v logical levels (does not required on platforms having build-in UART interface, like Raspberry PI)

Schematics

Schematics

mhz19b's People

Contributors

dependabot[bot] avatar fedulovivan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

abrahammlg

mhz19b's Issues

Historical data in web page is one hour ahead compared to PC clock

Hello,

My configuration:

  • System: Kernel: 4.4.0-138-generic x86_64 (64 bit)
  • Distro: Linux Mint 18.3 Sylvia
  • yarn 1.13.0-1
  • nodejs 11.6.0-1nodesource1

$ timedatectl
Local time: P 2019-01-13 13:42:18 EET
Universal time: P 2019-01-13 11:42:18 UTC
RTC time: P 2019-01-13 11:42:18
Time zone: Europe/Tallinn (EET, +0200)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no
Br,
Ajut

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.