Sensirion / makecode-extension-scd41

MIT License
3 stars 5 forks source link

i2c communication with CO2 sensor SCD41 (Sensirion) not working flawless #1

Closed JonahPi closed 3 years ago

JonahPi commented 3 years ago

I tested the new evaluation kit from Sensirion with the MicroBit: library , it works like a charm, CO2, humidity and temperature can be read continuously. When I tried to run the same library with the Calliope, I was able to read CO2 values but not reliably, sometimes a 0 value would be indicated. Temperature and humidity values could not be read at all, for temperature the reading shows -44° C for humidity 0.

psachs commented 3 years ago

Hi

Thank you for the bug report. Currently I don't have access to a Calliope for testing. I have some ideas what could cause this issue and will have a look at it within the next days.

psachs commented 3 years ago

Hi @JonahPi I orderd a calliope mini and was able to successfully test and fix the driver today. The issue was most probably due to missing pauses for get_data_ready and read_measurement. There is an open pull request with the changes. I tested it for several minutes without any issues. I will close this issue once the code is merged. I would appreciate if you can verify that the code works for you as well

JonahPi commented 3 years ago

Hi psachs, thanks a lot for your help! Your solution works perfectly fine now. rH, Temp and CO2 values are shown correctly.