Main Content

Pressure Sensor

Measure atmospheric pressure


Simulink Support Package for Android Devices / Sensors

  • Pressure Sensor block


Get the atmospheric pressure measurement in hectopascals (hPa) from the pressure sensor on the Android™ device.

The Pressure Sensor block outputs a single—precision scalar value.

One hectopascal is equivalent to 1 millibar. Standard atmospheric pressure is 1013.25 hPa. Both weather conditions and altitude affect atmospheric pressure.


During simulations without hardware, this block outputs zeros. See Block Produces Zeros or Does Nothing in Simulation.


Sample time

Specify how often the block reads the sensor.

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

Version History

Introduced in R2014a