From 5e63efd5c3356da9266bdb832bd43147891244a5 Mon Sep 17 00:00:00 2001 From: Sai Machiraju Date: Sun, 7 Jan 2024 14:11:05 -0800 Subject: [PATCH] Added SHT3X Sensor Documentation. --- documents/sensors/sht3x_hookup_guide.md | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 documents/sensors/sht3x_hookup_guide.md diff --git a/documents/sensors/sht3x_hookup_guide.md b/documents/sensors/sht3x_hookup_guide.md new file mode 100644 index 0000000..87bd71c --- /dev/null +++ b/documents/sensors/sht3x_hookup_guide.md @@ -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 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 +```