- Delaying and repeating i2c operation automatically when i2c interface is busy removed. User has to deal with concurrency using semaphores.
- GPIO_ID_PIN macros removed - Soft reset mechanism of SHT3x does not work when sensor is in any measurement mode. Therefore, it does not abort initialization procedure anymore - typos - changes to use the same source code with ESP8266 (esp-open-rtos) and ESP32 (ESP-IDF)
This commit is contained in:
parent
c3ae04c93f
commit
ca0b5da905
7 changed files with 254 additions and 110 deletions
|
@ -6,29 +6,31 @@ These examples demonstrate the usage of the SHT3x driver with only one and multi
|
|||
|
||||
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.
|
||||
To run examples with **one sensor**, just use GPIO14 (SCL) and GPIO13 (SDA) to connect to the SHT3x sensor's I2C interface.
|
||||
|
||||
```
|
||||
+------------------------+ +--------+
|
||||
| ESP8266 Bus 0 | | SHT3x |
|
||||
| GPIO 5 (SCL) >---- > SCL |
|
||||
| GPIO 4 (SDA) ------- SDA |
|
||||
| | +--------+
|
||||
+------------------------+
|
||||
+-----------------+ +----------+
|
||||
| ESP8266 / ESP32 | | SHT3x |
|
||||
| | | |
|
||||
| GPIO 14 (SCL) ------> SCL |
|
||||
| GPIO 13 (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.
|
||||
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 GPIO5 (SCL) and GPIO4 (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 |
|
||||
+------------------------+ +----------+
|
||||
+-----------------+ +----------+
|
||||
| ESP8266 / ESP32 | | SHT3x_1 |
|
||||
| | | |
|
||||
| GPIO 14 (SCL) ------> SCL |
|
||||
| GPIO 13 (SDA) <-----> SDA |
|
||||
| | +----------+
|
||||
| | | SHT3x_2 |
|
||||
| | | |
|
||||
| GPIO 5 (SCL) ------> SCL |
|
||||
| GPIO 4 (SDA) <-----> SDA |
|
||||
+-----------------+ +----------+
|
||||
```
|
||||
|
||||
## Example description
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue