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

Added SHT3X Sensor Documentation #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions documents/sensors/sht3x_hookup_guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Interfacing SHT3X Temperature & Humidity Sensors

## Code Implementation

Begin by downloading the [starter code from DFRobot's website](https://wiki.dfrobot.com/Digital_Temperature_and_Humidity_sensor__With_Stainless_Steel_Probe___SKU_SEN0148_).

Based on your device model, you may need to be mindful of how you create instances of the `DFRobot_SHT3x` class. For SEN0148, the stainless-steel model, you will need to provide the correct arguments to the class constructor. The I2C address is 0x44 and the internal reset pin of the driver integrated circuit is 4.

```cpp
#include <DFRobot_SHT3x.h>

DFRobot_SHT3x sht3x(&Wire, 0x44, 4);
```

>**Note:** `DFRobot_SHT3x.h` imports `Wire.h`, allowing `Wire` to be resolved.

## Testing

[DFRobot's library GitHub Repository](https://github.com/DFRobot/DFRobot_SHT3x/tree/master) contains multiple Arduino sketches in the `examples/` directory. Clone the repository locally and open `periodicDataReading.ino`. **Change the initialization of the `sht3x` object, as shown above.**

Upload the sketch to your board. Verify that reasonable temperature and humidity values are displayed in the Serial Console.

```
------------------Read data in cycle measurement mode-----------------------
chip serial number: 269652062
Ambient temperature(°C/F):18.98 C/66.16 F Relative humidity(%RH):31.07 %RH
Ambient temperature(°C/F):18.98 C/66.16 F Relative humidity(%RH):31.07 %RH
Ambient temperature(°C/F):18.98 C/66.16 F Relative humidity(%RH):31.07 %RH
Ambient temperature(°C/F):18.98 C/66.16 F Relative humidity(%RH):31.07 %RH
Ambient temperature(°C/F):18.98 C/66.16 F Relative humidity(%RH):31.07 %RH
Ambient temperature(°C/F):18.98 C/66.16 F Relative humidity(%RH):31.07 %RH
```