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.


Read the pressure value from the Air Pressure sensor


pressure= readPressure(mysh)



pressure= readPressure(mysh) returns the pressure value read from the Air Pressure sensor.


collapse all

You can read pressure from the Air Pressure sensor.

ans = 


Read the pressure from the Air Pressure sensor.

Input Arguments

collapse all

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

Output Arguments

collapse all

The pressure value read from the Air pressure sensor. The output of this method is double and the unit of measurement for the pressure is Pascal (Pa).

Extended Capabilities

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

Introduced in R2016b