sparkfun / SparkFun_SCD30_Arduino_Library

An Arduino library for the SCD30 NDIR CO2 sensor.
Other
84 stars 47 forks source link

Faulty CRC computation #16

Closed MBjoern closed 3 years ago

MBjoern commented 3 years ago

The interface for setForcedRecalibrationFactor is not working. I assume that the CRC computation used in the sendCommand function is faulty, as I'd expect the checksum to be 0x50, but the code here is getting a 0x33. Hence the forced recalibration is never executed on the chip.

Surprisingly, the other checksums are correct, only this one seams to be affected.

nseidle commented 3 years ago

Do you have some simple code that can demonstrate your issue?

awatterott commented 3 years ago

I can confirm that setForcedRecalibrationFactor() is working. Maybe the issue is related when the function is called to fast after power-up. The datasheet says that at least 2 minutes in a stable environment are needed and from our experiences it is not working or has no effect, when the time is too short.

PaulZC commented 3 years ago

Hi @MBjoern , Are you still having problems with setForcedRecalibrationFactor? Best wishes, Paul

MBjoern commented 3 years ago

Hi Paul

Thank you for getting back to me. I did not manage to further test the issue. I've just noticed the discrepancy w.r.t. the CRC value. If the library works for others, then it appears to be a problem on my end. This issue can be closed accordingly. Thank you.