This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

readHumidity

Read the humidity value from the Humidity sensor

Syntax

humidity= readHumidity(mysh)

Description

example

humidity= readHumidity(mysh) returns the relative humidity value read from a Humidity sensor in percentage.

Examples

collapse all

You can read humidity from the Humidity sensor.

readHumidity(mysh)
ans =
		36.5456

Input Arguments

collapse all

Connection to a SenseHAT board, specified as a sensehat object.

Output Arguments

collapse all

The humidity value read from the Humidity sensor. The output of this method is double and the unit of measurement for the humidity is percentage relative humidity (%rh).

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced in R2016b