Code Monkey home page Code Monkey logo

pxt-airquality's Introduction

airQuality

This package adds functionality to the CCS811 board. Based in the work of ADataDate

Usage

  • The CCS811 Air Quality Sensor can be directly mated to the matching pins (I2C) of the SAMD21 system.
  • I2C is set up so the user needs to start the device, then read the data.
  • The CCS811 sensor takes 20 minutes to burn-in or get meaningful data.
  • The TVOCs are presented as number between 0ppb to 1187ppb.
  • The eCO2 (equivalent CO2) is presented as a number between 400ppm to 8192ppm.

Pins Used

  • -- I2C - SCL
  • -- I2C - SDA

Air Quality Data

The CCS811 air quality sensors communicates via I2C. The data returned as a number can be stored in a variable, displayed on the 5x5 LED Matrix or sent serially to OpenLog.

  • |Read eCO2|block reads the equivalent CO2 and can be any number between 400ppm and 8182ppm.
  • |Read TVOCs|block reads the total organic volatile compounds and can be any number between 0ppb to 1187ppb.
  • |Device Error|block is used while troubleshooting otherwise don't use it. It will return a number corresponding to a specific error on the CCS811.
  • |Device Status|block is used while troubleshooting otherwise don't use it.
  • |HWID|block is used to test the most basic read on the I2C line. Use if you are having probelms establishing communication.

Example Project:

The following project will read the eCO2 and TVOCs data.

let eCO2 = 0
let TVOCs = 0
loop.forever(() => {
    TVOCs = airQuality.readTvoc()
    eCO2 = airQuality.readCo2()
    loop.pause(1000)
})

MakerCode Microbit

Maintainer

Electronic Cats invests time and resources providing this open source design, please support Electronic Cats and open-source hardware by purchasing products from Electronic Cats!

License

MIT

Supported targets

  • for PXT/maker
airQuality

pxt-airquality's People

Contributors

oscar-raygoza avatar sabas1080 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pxt-airquality's Issues

Makecode extension

He, is there a way to obtain the CC811 extension to the microbit Makecode
can not find it any where like your picture

thank you in advance

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.