esp-open-rtos/examples/sht3x
Gunar Schorcht a53586eb75 SHT3x driver minor changes
- type sht3x_values_t replaced by separate float values
- additional repeatability parameter defined for function sht3x_start_measurement
- parameter of function sht3x_get_measurement_duration changed from
  sht3x_sensort_t to sht3_repeat_t
- sensor modes and repeatability levels extended by prefix sht3x_
2017-10-21 19:09:31 +02:00
..
sht3x_one_sensor SHT3x driver minor changes 2017-10-21 19:09:31 +02:00
sht3x_two_sensors SHT3x driver minor changes 2017-10-21 19:09:31 +02:00
README.md Driver for Sensirion SHT3x sensor added 2017-10-20 17:18:33 +02:00

SHT3x Driver Examples

These examples demonstrate the usage of the SHT3x driver with only one and multiple SHT3x sensors.

Hardware setup

There are examples for only one sensor and examples for two sensors.

To run examples with one sensor, just use GPIO5 (SCL) and GPIO4 (SDA) to connect to the SHT3x sensor's I2C interface.

 +------------------------+     +--------+
 | ESP8266  Bus 0         |     | SHT3x  |
 |          GPIO 5 (SCL)  >---- > SCL    |
 |          GPIO 4 (SDA)  ------- SDA    |
 |                        |     +--------+
 +------------------------+

If you want to run examples with two sensors, you could do this with only one bus and different I2C addresses or with two buses and the same or different I2C addresses. In later case, use GPIO14 (SCL) and GPIO12 (SDA) for the second bus to connect to the second SHT3x sensor's I2C interface.

 +------------------------+     +----------+
 | ESP8266  Bus 0         |     | SHT3x_1  |
 |          GPIO 5 (SCL)  >-----> SCL      |
 |          GPIO 4 (SDA)  ------- SDA      |
 |                        |     +----------+
 |          Bus 1         |     | SHT3x_2  |
 |          GPIO 14 (SCL) >-----> SCL      |
 |          GPIO 12 (SDA) ------- SDA      |
 +------------------------+     +----------+

Example description

Examples show how to use the driver in single shot as well as in periodic mode.

sht3x_one_sensor

The simple example show how to use the driver with one SHT3x sensor. It demonstrates two different user task implementations, one in single shot mode and one in periodic mode.

sht3x_two_sensors

This simple example shows how to use the driver for two sensors. As with the example sht3x_one_sensor, it uses two different user task implementations.