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.

readPressure

Read the pressure value from the Air Pressure sensor

Syntax

pressure= readPressure(mysh)

Description

example

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

Examples

collapse all

You can read pressure from the Air Pressure sensor.

readPressure(mysh) 
ans = 

   9.1102e+04 

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