Reference
Last revision 2025/12/17
The article offers a detailed exploration of the SHT3x sensor library and its integration with Arduino, focusing on the IIC communication protocol, API functions for temperature and humidity measurements, and practical implementation tips.
Library
- SHT3x Library and Example Programs
- Installation instructions: About how to install the library?
Communication Protocol Description
- Communication Interface: IIC (I²C)
- IIC Address Options:
- 0x45 (ADR pin connected to VDD)
- 0x44 (ADR pin connected to GND)
- Supported Voltages: 3.3V/5V compatible
API Description
/**
* @brief Get the measured temperature (in degrees Celsius).
* @return Return the temperature data of float type.
*/
float getTemperatureC();
/**
* @brief Get the measured temperature (in degrees Fahrenheit).
* @return Return the temperature data of float type.
*/
float getTemperatureF();
/**
* @brief Get measured humidity(%RH).
* @return Return the humidity data of float type.
*/
float getHumidityRH();
Key API Functions Used in Examples:
begin(): Initialize sensor communicationreadSerialNumber(): Retrieve chip serial numbersoftReset(): Reset sensor via IIC commandstartPeriodicMode(): Enter periodic measurement modestopPeriodicMode(): Exit periodic measurement modesetTemperatureLimitC(): Set temperature thresholds (Celsius)setHumidityLimitRH(): Set humidity thresholds (%RH)environmentState(): Check threshold violation status
Other Supplementary Information
Was this article helpful?
