Skip to content

Extend SHT3x driver to work SHT4x (and GXHTV4) and allow multiple sensors#1998

Draft
MaxineMuster wants to merge 12 commits intoopenshwprojects:mainfrom
MaxineMuster:_SHT4x_GXHTV4
Draft

Extend SHT3x driver to work SHT4x (and GXHTV4) and allow multiple sensors#1998
MaxineMuster wants to merge 12 commits intoopenshwprojects:mainfrom
MaxineMuster:_SHT4x_GXHTV4

Conversation

@MaxineMuster
Copy link
Copy Markdown
Contributor

Sensors must be on different pins, for they share address 0x44

Additional sensors are added per command
SHT_AddSensor [sda-pin] [scl-pin] [chan_t= (optional, 0 if ommited)] [chan_h= (optional, 0 if ommited)] [type=3or4 (optional, autodetect if ommited)]

Sensors can be listed with
SHT_ListSensors:

Info:SENSOR:SHT_ListSensors: 2 sensor(s) registered:
Info:SENSOR:  [0] SDA=17 SCL=24 type=SHT3x   serial=0A29D08A  last T=21.2C H=45%
Info:SENSOR:  [1] SDA=28 SCL=23 type=SHT4x   serial=0AE1B59E  last T=21.4C H=46%
Info:CMD:[WebApp Cmd 'SHT_ListSensors' Result] OK

Most commands extended to allow an additional argument as "sensor" if there is more than one.

Will need some more testing, but basic function is working:

grafik

Probably GXHTV4 code will be removed later

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

Successfully merging this pull request may close these issues.

1 participant