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

Blocking RHT03 temperature/humidity reader. Call begin(), then update() before accessing cached readings; the caller controls the sampling interval. More...

#include <RHT03.hpp>

Public Member Functions

 RHT03 ()
 Construct a reader without configuring a GPIO.
void begin (int dataPin)
 Bind and configure the data GPIO as INPUT_PULLUP.
int update ()
 Read and validate a sensor frame synchronously.
float tempC ()
 Return the cached temperature in degrees Celsius.
float tempF ()
 Return the cached temperature in degrees Fahrenheit.
float humidity ()
 Return the cached relative humidity in percent.

Detailed Description

Blocking RHT03 temperature/humidity reader. Call begin(), then update() before accessing cached readings; the caller controls the sampling interval.

Member Function Documentation

◆ begin()

void RHT03::begin ( int dataPin)

Bind and configure the data GPIO as INPUT_PULLUP.

Parameters
dataPinSensor data pin.

◆ update()

int RHT03::update ( )

Read and validate a sensor frame synchronously.

Returns
1 on success; zero or negative values indicate timing or checksum errors. Only a successful read updates the cached temperature and humidity.

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