Giter Site home page Giter Site logo

seeed_scd30's Introduction

Seeed SCD30 Library Build Status

This is the Arduino library for Seeed's SCD30 based products.

Usage

1.Git clone this resp to your Arduino IDE's libraries directory.
2.Run the demo "SCD30_Example" on examples directory.

Notice

  • The on-board RH/T sensor is influenced by thermal self-heating of SCD30 and other electrical components.
    Design-in alters the thermal properties of SCD30 such that temperature and humidity offsets may occur when operating the sensor in end-customer devices.
    Compensation of those effects is achievable by writing the temperature offset found in continuous operation of the device into the sensor. User can use "setTemperatureOffset(offset)" to set temperature offset,The param "offset" is type of uint16_t,one tick corresponding to 0.01℃.
    When user set the temperature offset,the measurement result of temperature won't change immediately,but a slow change process.
    Take notice that the humidity value will change with the temperature value changes.

  • The sensor needs to be calibrated at the first time it is used.

    When activated for the first time a period of minimum 7 days is needed so that the algorithm can find its initial parameter set for ASC. The sensor has to be exposed to fresh air for at least 1 hour every day.

    the sensor may not be disconnected from the power supply,otherwise the procedure to find calibration parameters is aborted and has to be restarted from the beginning

    User can run the SCD30_auto_calibration.ino to start the calibration.


This software is written by Wayen Weng for seeed studio and is licensed under The MIT License. Check License.txt for more information.

Contributing to this software is warmly welcomed. You can do this basically by
forking, committing modifications and then pulling requests (follow the links above
for operating guide). Adding change log and your contact into file header is encouraged.
Thanks for your contribution.

Seeed Studio is an open hardware facilitation company based in Shenzhen, China.
Benefiting from local manufacture power and convenient global logistic system,
we integrate resources to serve new era of innovation. Seeed also works with
global distributors and partners to push open hardware movement.

Analytics

seeed_scd30's People

Contributors

3110 avatar ansonhex avatar baorepo avatar bigbearishappy avatar keenedge avatar linux-downey avatar pillar1989 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

seeed_scd30's Issues

WHy does it work with sending 5 bytes leaving out the header-byte that is written in the sensirion-documentation?

Hello everybody,

I have tested the library and got my SCD30 working. Then I started to analyse the code of the library.

For example When sending the command Altitude Compensation

example Set Temperature Offset 
I2C-protocol        
ByteNo  1       2    3        4       5       6
               Cmd  Cmd   Altidude Altidude  CRC  
      Header   MSB  LSB      MSB     LSB
Start  0xC2    0x54 0x03     0x01    0xF4    0x33 Stop  

The Sensirion-documentation says you have to send six byte beginning with the header

see here https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/9.5_CO2/Sensirion_CO2_Sensors_SCD30_Interface_Description.pdf

But the given code is sending just 5 bytes

#define SCD30_SET_TEMPERATURE_OFFSET            0x5403


void SCD30::setTemperatureOffset(uint16_t offset) {
    writeCommandWithArguments(SCD30_SET_TEMP_OFFSET, offset);
}

void SCD30::writeCommandWithArguments(uint16_t command, uint16_t arguments) {
    uint8_t checkSum, buf[5] = { 0 };

    buf[0] = command >> 8;
    buf[1] = command & 0xff;
    buf[2] = arguments >> 8;
    buf[3] = arguments & 0xff;
    checkSum = calculateCrc(&buf[2], 2);
    buf[4] = checkSum;

    writeBuffer(buf, 5);   //<<== just sending 5 bytes leaving out the header is sufficient??
}


void SCD30::writeBuffer(uint8_t* data, uint8_t len) {
    Wire.beginTransmission(devAddr);
    Wire.write(data, len);
    Wire.endTransmission();
}

    writeBuffer(buf, 5);   //<<== just sending 5 bytes leaving out the header is sufficient??
 

best regards Stefan

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.