Sensirion / arduino-i2c-scd4x

Arduino library for Sensirion SCD4x sensors
BSD 3-Clause "New" or "Revised" License
48 stars 19 forks source link

Cannot receive measurement data #14

Closed AddioElectronics closed 2 years ago

AddioElectronics commented 2 years ago

I have an ESP8266 connected to an SCD41 Adafruit module, and cannot get the sensor to send any measurement data. I have tried both periodic and single-shot mode, multiple MCU's at different voltages, and nothing. There is another I2C sensor hooked up and it reads just fine, I've tried to get it working with this connected and disconnected. I have also looked at it with my scope and logic analyzer and everything looks great, no noise problems.

The 2 problems I'm having are... When I call getDataReadyStatus(), it returns 0 almost every time, it has returned 0x8000 a few times but was unable to read after, and even then I don't think that is the part of the "last 11 bits". When I call readMeasurement() it returns "Not enough data received" every time. I've only managed to get it to read literally once, but it returned Co2 as 0 which means a bad sample. Other commands such as getting the serial number, setting/getting altitude/temp offset work just fine.

The example code also gives me the same error for the readMeasurement().

Is it safe to say its a faulty sensor? I'm 95% sure it is, but this project is for a client and I need to be 100% before telling him he needs to order a new sensor.

Edit: Another command that isn't working is the self test.

AddioElectronics commented 2 years ago

Got it working, need to supply it with 5v from an external source for some reason.