dbrgn / sht2x-rs

WIP Platform agnostic Rust driver for the Sensirion SHT2x temperature/humidity sensors.
Apache License 2.0
2 stars 2 forks source link

Use a "newtype", and add relative humidity measurement #4

Closed tim-seoss closed 2 years ago

tim-seoss commented 5 years ago

Any comments welcome, see also #2. I've not tested this on an embedded Linux device (but it compiles! :-) ).

I have tested it on an stm32f103 tho'.

LMK what you think.

tim-seoss commented 5 years ago

I've also added a change to zero out the status bits. These are currently returning zero on the sht21, but the datasheet doesn't guarantee this for bit zero, so I thought it was best to zero them to be on the safe side and to be consistent with the humidity conversion. Also updated to 2018 edition.

tim-seoss commented 5 years ago

Any further thoughts? Was thinking of tackling a couple of things in #3 but it'd be good to get this resolved first if poss...

Cheers,

Tim.

dbrgn commented 2 years ago

Merged in 26868762269dc054eeba0c236352f9b38372b0f4, thanks!