Nol.A SDK Library 26.11.2
For IoT System Software Development
Loading...
Searching...
No Matches
T9602_I2C Class Reference

Synchronous T9602 humidity and temperature reader. Call begin() first. Communication errors and sensor status are not reported. More...

#include <T9602_I2C.hpp>

Public Member Functions

 T9602_I2C (TwoWire &w, uint8_t address)
 Bind the I2C bus and 7-bit sensor address. Both are used by subsequent reads.
void begin ()
 Initialize the bound I2C bus.
float readTemperature ()
 Read the temperature register and return degrees Celsius.
float readHumidity ()
 Read the humidity register and return percent relative humidity.
void readHumidityAndTemperature (float *h, float *t)
 Read humidity and temperature in one four-byte transaction.

Detailed Description

Synchronous T9602 humidity and temperature reader. Call begin() first. Communication errors and sensor status are not reported.

Author
Jongsoo Jeong (CoXlab)
Date
2022. 7. 19.
Examples
plm100s/PLS100W_T9602-I2C/main.cpp.

Constructor & Destructor Documentation

◆ T9602_I2C()

T9602_I2C::T9602_I2C ( TwoWire & w,
uint8_t address )
inline

Bind the I2C bus and 7-bit sensor address. Both are used by subsequent reads.

54: wire(w), address(address) {}

Member Function Documentation

◆ readHumidityAndTemperature()

void T9602_I2C::readHumidityAndTemperature ( float * h,
float * t )

Read humidity and temperature in one four-byte transaction.

Parameters
hOutput in percent relative humidity; nullptr skips storing humidity.
tOutput in degrees Celsius; nullptr skips storing temperature.

The documentation for this class was generated from the following file: