UPM

The UPM API is a high level sensor library for IoT devices using MRAA. See examples here. Back to index page.
SparkFun sensor images provided under CC BY-NC-SA-3.0.

RHUSB Class

Module: rhusb

This module implements support for the Omega RH-USB Temperature and Humidity Sensor Probe. It connects via an integrated USB cable, and is accessed via a serial port. It is suitable for wall or duct mounting.

Methods

RHUSB

(
  • device
)
Number

RHUSB constructor

Parameters:

  • device String

    Path to the serial device

Returns:

Number:

update

()

Read current values from the sensor and update internal stored values. This method must be called prior to querying any values, such as temperature or humidity.

getTemperature

(
  • fahrenheit
)
Number

Get the current temperature. update() must have been called prior to calling this method.

Parameters:

  • fahrenheit Boolean

    true to return the temperature in degrees fahrenheit, false to return the temperature in degrees celsius. The default is false (degrees Celsius).

Returns:

Number:

The last temperature reading in Celsius or Fahrenheit

getHumidity

() Number

Get the current relative humidity. update() must have been called prior to calling this method.

Returns:

Number:

The last humidity reading

getFirmwareID

() String

Get the firmware identification string.

Returns:

String:

The firmware identification