spease / Sensirion

Library for Sensirion SHT1x & SHT7x family temperature and humidity sensors
12 stars 9 forks source link

Sh31 with exemple "NonBlcking" With arduino DUE does not compile for sensor Sensirion SHT31 #8

Open claudius310 opened 1 year ago

claudius310 commented 1 year ago

hello, I am a beginner and I wanted to use your program for this humidity and temperature sensor (Sensirion SHT31) without connecting it in I2C which blocks. It should be able to work with the codes intended for the SHT1X series. But the program does not compile with Arduino DUE, and gives the error: "no matching function for call to 'Sensirion::meas(const uint8_t&, unsigned int*, const bool&)" Thank you for your help

spease commented 1 year ago

Sounds like maybe for your platform that an unsigned int is different from a uint16_t. Try changing line 27 from unsigned int rawData; to uint16_t rawData;.

claudius310 commented 1 year ago

Hello, Thank you for your help Now the program compiles and is transferred. The problem is that I get errors and totally wrong values. See what returned:

15:26:29.962 -> Error: No response (ACK) received from sensor! 15:26:30.009 -> Error: No response (ACK) received from sensor! 15:26:30.062 -> Temperature = -40.10 C, Humidity = 0.10 %, Dewpoint = -90.17 C Thanks

claudius310 commented 1 year ago

It works well in I2c but the I2C is fragile in continuous operation.

spease commented 1 year ago

Thanks for continuing to provide feedback. I don't really have enough time for debugging it, but if you have a PR to fix it I'd be happy to merge it.

claudius310 commented 1 year ago

Hello, Thank you for your library and your help, unfortunately I do not have the skills to do this work because I am a beginner in this field. JC