This repository contains the embedded driver sources for Sensirion's SHT product line.
Download the latest ready-to-use driver bundle from the releases page
We strongly recommend to use the driver from the release bundle instead of cloning the repository.
git clone --recursive https://github.com/Sensirion/embedded-sht.git
embedded-common
submodule repository for the common embedded driver HALsht-common
common files for all SHTxx drivers, humidity conversion functionssht4x
SHT4 driversht3x
SHT3x/SHT8x drivershtc1
SHTC3/SHTC1/SHTW1/SHTW2 driverutils
Conversion functions (Centigrade to Fahrenheit, %RH relative humidity to aboslute humidity)
For sht3x
and sht4x
there are also updated drivers available in separate repositories.
make release
This will create the release
folder with the necessary driver files in it,
including a Makefile. That way, you have just ONE folder with all the sources
ready to build your driver for your platform.
You only need to touch the following files:
sensirion_arch_config.h
(architecture specifics, you need to specify the integer sizes)
and depending on your i2c implementation either of the following:
embedded-common/hw_i2c/sensirion_hw_i2c_implementation.c
functions for hardware i2c communication if your platform supports thatembedded-common/sw_i2c/sensirion_sw_i2c_implementation.c
functions for software i2c communication via GPIOs
- Adjust
sensirion_arch_config.h
if you don't have the<stdint.h>
header file available - Implement necessary functions in one of the
*_implementation.c
files described above - make
Please check the embedded-common repository for further information and sample implementations.