Sensirion / embedded-sps

Embedded i2c Driver for Sensirion Particulate Matter Sensors - Download the Zip Package from the Release Page
https://github.com/Sensirion/embedded-sps/releases
BSD 3-Clause "New" or "Revised" License
45 stars 15 forks source link

Device does not return measurements. Getting serial or device register works though... #57

Closed martinhorvath closed 2 years ago

martinhorvath commented 2 years ago

Hello Team,

I've got the sps30 attached to my raspberry pi zero and I'm using I2C. The device is available and I'm able to read/write data through I2C such as getting the serial or reading the device register:

Reading device status: [0, 0, 0, 0, 0, 0]

But for some reason, I only retrieve 0 mesasurements:

[0, 0, 129, 0, 0, 129, 0, 0, 129, 0, 0, 129, 0, 0, 129, 0, 0, 129, 0, 0, 129, 0, 0, 129, 0, 0, 129, 0, 0, 129, 0, 0, 129, 0, 0, 129, 0, 0, 129, 0, 0, 129, 0, 0, 129, 0, 0, 129, 0, 0, 129, 0, 0, 129, 0, 0, 129, 0, 0, 129]

Is there any check I can do to see if this is a hardware issue?

Best regards, Martin

martinhorvath commented 2 years ago

It was me reading the wrong section of the documentation. Had an incorrect address used (I2C 0x00,0x01 instead of 0x00,0x10).