Main Content

Humidity Sensor

Measure relative air humidity as percentage

Add-On Required: This feature requires the Simulink Support Package for Android Devices add-on.

  • Humidity Sensor block

Simulink Support Package for Android Devices / Sensors


Use the Humidity Sensor block to measure relative air humidity measurement as percentage from the humidity sensor on the Android® device.


During simulation with no hardware connected, this block does nothing. For more information, see Block Produces Zeros or Does Nothing in Simulation.



expand all

The block outputs the relative humidity in percentage (%).

Data Types: single


expand all

Specify a discrete time interval, in seconds, at which the block reads the humidity sensor of the device and outputs the data.


Smaller values for Sample time require the processor to complete the same number of instructions in less time, which can cause task overruns.

Version History

Introduced in R2014a