Skip to content

Latest commit

 

History

History
67 lines (41 loc) · 3.41 KB

library_reference.md

File metadata and controls

67 lines (41 loc) · 3.41 KB

Summary

Members Descriptions
class T9602 Library for the IP67-rated T9602 I2C temperature and relative humidity sensor.

class T9602

Library for the IP67-rated T9602 I2C temperature and relative humidity sensor.

Summary

Members Descriptions
public T9602() Instantiate the T9602 sensor class.
public uint8_t begin(uint8_t ADR_) Begin communications with the T9602 sensor.
public void updateMeasurements() Measure relative humidity [%] and temperature [degrees C].
public float getHumidity() Return the stored relative humidity [%].
public float getTemperature() Return the stored temperature [degrees C].
public String getString(bool takeNewReadings) The most important function for the user! Returns all data as a comma-separated string: "RH,T,".
public String getHeader() Return the header as an Arduino string: "Relative Humidity [%],Temp Atmos [C],".
public bool sleep() Dummy function to enable sleep mode.

Members

public T9602()

Instantiate the T9602 sensor class.

public uint8_t begin(uint8_t ADR_)

Begin communications with the T9602 sensor.

Parameters

  • ADR_ I2C address. Defaults to 0x28. This library cannot change this, but this option exists in case you make this change elsewhere.

public void updateMeasurements()

Measure relative humidity [%] and temperature [degrees C].

public float getHumidity()

Return the stored relative humidity [%].

public float getTemperature()

Return the stored temperature [degrees C].

public String getString(bool takeNewReadings)

The most important function for the user! Returns all data as a comma-separated string: "RH,T,".

This string is: "RELATIVE_HUMIDITY,TEMPERATURE,". It is written with the code: return String(RH) + "," + String(Temp) + ","

Parameters

  • takeNewReadings if true run updateMeasurements before returning values. Otherwise, just return values.

public String getHeader()

Return the header as an Arduino string: "Relative Humidity [%],Temp Atmos [C],".

public bool sleep()

Dummy function to enable sleep mode.

Currently not used. Instead, we simply power the sensor down.

Generated by Moxygen