Sensirion/python-i2c-sht

Document how to use sht3x driver for SHT8x

kratsg opened this issue ยท 6 comments

As it seems like this repository is somewhat maintained (at least recent changes) - I was wondering if there were plans to implement for SHT85 (or newer SHT devices)?

The SHT8x is the same chip as a SHT3x, so you should be able to just use the sht3x driver.

I can confirm that this works for me

from sensirion_i2c_driver import I2cConnection
from sensirion_i2c_sht.sht3x import Sht3xI2cDevice
from sensirion_i2c_driver.linux_i2c_transceiver import LinuxI2cTransceiver
sht3x = Sht3xI2cDevice(I2cConnection(LinuxI2cTransceiver('/dev/i2c-1')))
sht3x.single_shot_measurement()
temp, humidity = sht3x.single_shot_measurement()
print(temp, humidity)

on a raspberry pi using the GPIO pins 2/3 (data/clock). Do you think it would be possible, at least for the sake of sanity, to maybe make an SHT8x alias to SHT3x? Or provide some documentation somewhere? It really was not obvious that this would be the case!

Do you think it would be possible, at least for the sake of sanity, to maybe make an SHT8x alias to SHT3x?

I guess this should be possible. @ubruhin what do you think?

I guess this should be possible. @ubruhin what do you think?

Sure! The simplest solution would probably be to re-export the Sht3xI2cDevice class with the name Sht8xI2cDevice, but then it still doesn't appear in the documentation ๐Ÿค” Maybe we should create a new class Sht8xI2cDevice and inherit from Sht3xI2cDevice to get it documented properly...

The inheritance thing is probably the easiest and we could even document on it, that it is the same chip, just soldered on a PCB.

As there was no activity on this issue, i'll close it. Feel free to reopen or open another issue, if you need any further assistance.

Keep prototyping, We'll love to see your projects in the field.