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

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 communication
  • readSerialNumber(): Retrieve chip serial number
  • softReset(): Reset sensor via IIC command
  • startPeriodicMode(): Enter periodic measurement mode
  • stopPeriodicMode(): Exit periodic measurement mode
  • setTemperatureLimitC(): Set temperature thresholds (Celsius)
  • setHumidityLimitRH(): Set humidity thresholds (%RH)
  • environmentState(): Check threshold violation status

Other Supplementary Information

Was this article helpful?

TOP