readPressure

Read the pressure value from the Air Pressure sensor

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