Giter VIP home page Giter VIP logo

air-quality-monitor's Introduction

air-quality-monitor (deprecated)

Constructed by Sensirion SCD30 and SPS30 sensors, Arduino Nano IoT and Raspberry Pi 4B. Used software is Mosquitto, Node-RED, InfluxDB and Grafana.

Grafana with data from sensors

Overview of system

I recommend using IOTstack for an easy setup of the Raspberry Pi and its software.

Overview of Node-RED

The output from the Arduino is in the following JSON format:

{
  "c": 478,
  "t": 24.02,
  "h": 38.39
}

Node-RED sets it to the following:

{
  "co2": 478,
  "temperature": 24.02,
  "humidity": 38.39
}

with a change node and the following code:

{
  "co2": msg.payload.c,
  "temperature": msg.payload.t,
  "humidity": msg.payload.h
}

Libraries used

SparkFun_SCD30_Arduino_Library

sps30 by paulvha

pubsubclient by knolleary

Adafruit_SleepyDog

air-quality-monitor's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

air-quality-monitor's Issues

code not compiling

Hi.

I managed to edit most of the code to make it work but Im stuck with the following error

Compilation error: 'ERR_DATALENGTH' was not declared in this scope

o {
ret = sps30.GetValues(&val);
if (ret == ERR_DATALENGTH){
if (error_cnt++ > 3) {
return(false); //error during reading sps30 values
}
delay(1000);
}
else if(ret != ERR_OK) {
return(false); //error during reading sps30 values
}
} while (ret != ERR_OK);

massPM2 = val.MassPM2;
massPM10 = val.MassPM10 - val.MassPM2; //PM10 - PM2 to see all particles between 2.5 to 10 micrometer
return true;
}

Can you please help me as this is part of the code you uploaded?

Cheers

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.