Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to use sht3x driver for SHT8x #1

Closed
kratsg opened this issue Nov 17, 2020 · 6 comments
Closed

Document how to use sht3x driver for SHT8x #1

kratsg opened this issue Nov 17, 2020 · 6 comments

Comments

@kratsg
Copy link

kratsg commented Nov 17, 2020

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)?

@rnestler
Copy link

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

@kratsg
Copy link
Author

kratsg commented Nov 17, 2020

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!

@rnestler
Copy link

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?

@rnestler rnestler changed the title Support for SHT8x? Document how to use sht3x driver for SHT8x Nov 18, 2020
@ubruhin
Copy link

ubruhin commented Nov 23, 2020

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...

@rnestler
Copy link

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.

@MBjoern
Copy link

MBjoern commented Apr 6, 2021

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.

@MBjoern MBjoern closed this as completed Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants