Code Monkey home page Code Monkey logo

Comments (2)

rzbrk avatar rzbrk commented on July 30, 2024

Sample output:

2021/08/15-19:23:44.354063 SCD30 sensor version: 3.66
2021/08/15-19:23:44.355339 CO2 calibration value: 400 ppm
2021/08/15-19:23:44.357728
2021/08/15-19:23:44.358840 CO2: 382.01 ppm
2021/08/15-19:23:44.359810 Temperature: 26.88 degrees
2021/08/15-19:23:44.361147 Humidity: 52.5 percent
2021/08/15-19:23:44.361877
2021/08/15-19:23:44.362676 CO2: 382.01 ppm
2021/08/15-19:23:44.365560 Temperature: 26.88 degrees
2021/08/15-19:23:44.370692 Humidity: 52.25 percent
2021/08/15-19:23:44.377429
2021/08/15-19:23:50.045695 Perform calibration . . .
2021/08/15-19:23:50.062192 CO2 calibration value: 400 ppm
2021/08/15-19:23:50.069064
2021/08/15-19:23:55.808336 CO2: 386 ppm
2021/08/15-19:23:55.813343 Temperature: 26.88 degrees
2021/08/15-19:23:55.818199 Humidity: 52.5 percent
2021/08/15-19:23:55.825306
2021/08/15-19:24:01.637596 CO2: 400 ppm
2021/08/15-19:24:01.644577 Temperature: 26.88 degrees
2021/08/15-19:24:01.649578 Humidity: 52.25 percent
2021/08/15-19:24:01.656817
2021/08/15-19:24:07.394098 CO2: 400.01 ppm
2021/08/15-19:24:07.399702 Temperature: 26.88 degrees
2021/08/15-19:24:07.404827 Humidity: 52.25 percent
2021/08/15-19:24:07.411698
2021/08/15-19:24:13.061972 CO2: 402 ppm
2021/08/15-19:24:13.074855 Temperature: 26.88 degrees
2021/08/15-19:24:13.079485 Humidity: 52.25 percent
2021/08/15-19:24:13.085343
2021/08/15-19:24:18.812354 CO2: 400.01 ppm
2021/08/15-19:24:18.817065 Temperature: 27 degrees
2021/08/15-19:24:18.822221 Humidity: 52.25 percent
2021/08/15-19:24:18.829351
2021/08/15-19:24:24.522863 CO2: 400.01 ppm
2021/08/15-19:24:24.531493 Temperature: 26.88 degrees
2021/08/15-19:24:24.536346 Humidity: 52.25 percent
2021/08/15-19:24:24.543264
2021/08/15-19:24:30.117772 CO2: 400.01 ppm
2021/08/15-19:24:30.121302 Temperature: 27 degrees
2021/08/15-19:24:30.126366 Humidity: 52.25 percent
2021/08/15-19:24:30.133393
2021/08/15-19:24:35.857126 CO2: 400.01 ppm
2021/08/15-19:24:35.865879 Temperature: 26.88 degrees
2021/08/15-19:24:35.870608 Humidity: 52.5 percent
2021/08/15-19:24:35.877870
2021/08/15-19:24:41.600771 CO2: 400.01 ppm
2021/08/15-19:24:41.606359 Temperature: 26.88 degrees
2021/08/15-19:24:41.611496 Humidity: 52.5 percent
2021/08/15-19:24:41.618252

The calibration in the above example is performed after the 2nd measurement cycle. Apparently, the new calibration takes effect only in the overnext measurement cycle after the calibration.

from calliopeo_astropi.

rzbrk avatar rzbrk commented on July 30, 2024

Note: In a first version of the hex a had a strange behavior with the SCD30 driver. When I inserted outputting of the sensor version (SCD30.getVersion) and the current calibration value (SCD30.getCalibration) in every measurement loop I got strange results for the CO2 concentration and temperature (both zero) and for the humidity (above 100 %). This could be an indication that there might be something wrong with the driver (https://github.com/calliope-edu/pxt-SCD30).

I could reproduce very similar issues with the test script provided by the driver after modifying this way:

//Blocks Test
basic.forever(function () {
    serial.writeLine("" + (SCD30.getVersion()))
    serial.writeLine("" + (SCD30.getCalibration()))
    serial.writeLine("" + (SCD30.readCO2()))
    serial.writeLine("" + (SCD30.readTemperature()))
    serial.writeLine("" + (SCD30.readHumidity()))
    basic.pause(1000)
})

This resulted in "strange" results that were outputted occasionally for CO2, temperature or humidity.

from calliopeo_astropi.

Related Issues (20)

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.