Skip to content

NorthernWidget-Skunkworks/Haar_Library

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

Summary

Members Descriptions
class Haar Library for the rugged temperature, pressure, relative-humidity sensor.

class Haar

Library for the rugged temperature, pressure, relative-humidity sensor.

Project Haar, named for the cold fog off the north sea, is a pressure, temperature, and relative-humidity sensor that can withstand full submersion. Bobby Schulz designed it after the consistently-near-0C temperatures and 100% relative humidity of Chimborazo Volcano, Ecuador, claimed the lives of many brave but misguided BME-280 units, who then catistrophically bricked their I2C buses and those of their associated data loggers, thus taking down a large fraction of our hydromet network.

May their silicon and copper souls join the chorus of the stars.

DOI

Summary

Members Descriptions
public Haar() Instantiate the Haar sensor class.
public uint8_t begin(uint8_t ADR_) Begin communications with the Haar sensor.
public float getPressure(bool update) Return the currently stored pressure [in mBar].
public float getHumidity(bool update) Return the currently stored relative humidity [%].
public float getTemperature(Sensor Device,bool update) Return the currently stored Temperature [degrees C].
public uint8_t sleep(bool state) Enable or disable device sleep mode THIS FUNCTION CURRENTLY DOES NOTHING!
public uint8_t updateMeasurements(bool block) Return a new sample of all of the data.
public bool newData() Checks for updated data. Returns true if new data are available; otherwise returns false
public String getString() The most important function for the user! Returns all data as a comma-separated string: "P,RH,T(P),T[RH],".
public String getHeader() Returns a header: "Pressure Atmos [mBar], Humidity [%], Temp Pres [C], Temp RH [C],".

Members

public Haar()

Instantiate the Haar sensor class.

public uint8_t begin(uint8_t ADR_)

Begin communications with the Haar sensor.

Parameters

  • ADR_ I2C address. Defaults to 0x42.

public float getPressure(bool update)

Return the currently stored pressure [in mBar].

Parameters

  • update Read and store a new pressure value before sending? By default is false; simply returns the already-available pressure value.

public float getHumidity(bool update)

Return the currently stored relative humidity [%].

Parameters

  • update Read and store a new pressure value before sending? By default is false; simply returns the already-available RH value.

public float getTemperature(Sensor Device,bool update)

Return the currently stored Temperature [degrees C].

Parameters

  • Device Selects which sensor is used to measure the temperature. Input can be RH_Sense, which corresponds to a 0, or Pres_Sense, which corresponds to a 1. By default, this is RH_Sense, as this sensor has a better internal temperature sensor.

  • update Read and store a new pressure value before sending? By default is false; simply returns the already-available temperature value.

public uint8_t sleep(bool state)

Enable or disable device sleep mode THIS FUNCTION CURRENTLY DOES NOTHING!

Parameters

  • State Can be ON (1) or OFF (0). By default, this command sets "Sleep" to ON, sending the device into a low-power sleep mode.

public uint8_t updateMeasurements(bool block)

Return a new sample of all of the data.

Parameters

  • Block if true, wait for data to be returned. Defaults to false.

public bool newData()

Checks for updated data. Returns true if new data are available; otherwise returns false

Parameters

  • Block if true, wait for data to be returned. Defaults to false.

public String getString()

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

This string is: PRESSURE,RELATIVE_HUMIDITY, TEMPERATURE_FROM_PRESSURE_SENSOR,TEMPERATURE_FROM_RH_SENSOR,

public String getHeader()

Returns a header: "Pressure Atmos [mBar], Humidity [%], Temp Pres [C], Temp RH [C],".

Generated by Moxygen

About

Arduino interface for the Haar temp, pressure, RH sensor

Resources

License

Stars

Watchers

Forks

Packages

No packages published