awsiuk / ENS160

ENS160 library for micropython
3 stars 2 forks source link

calibrate data issue #3

Closed Yutao-Jin closed 1 year ago

Yutao-Jin commented 1 year ago

Thank you for this amazing library. I was wondering in the datasheet, they specify the temp data should be (temp + 273.15) * 64.0 + 0.5, but i did not see any conversion like this in the library, the same thing also applies to the humidity data.

image
awsiuk commented 1 year ago

Hi,

There is byte shift by 8bits for temperature which gives multiplication by 64. but indeed calculation is missing. This needs to be fixed.

awsiuk commented 1 year ago

i have no longer ENS160 but it should work with the changes in the code. Code updated with your notes. Thanks!

Yutao-Jin commented 1 year ago

Thank you so much

Yutao-Jin commented 1 year ago

Sorry to bother you again, have you encountered this issue, that the ens160 outputs good data when first powered up but after the initial start-up the when the VALIDITY FLAG goes to 0, which meas normal operation it just outputs 0 for all data

image