Arduino_MKRENV - readPressure()

Read the pressure sensor’s value. If no unit is specified, the value will be expressed in kilopascal.

Syntax

ENV.readPressure(unit)

Parameters

  • unit: PSI to get the pressure in pound per square, MILLIBAR to get the pressure in millibar and KILOPASCAL to get the pressure in kilopascal (default).

Returns

The sensor’s pressure value as float in the specified unit.

Example

Serial.print("Pressure    = ");
Serial.print(ENV.readPressure());
Serial.println(" kPa");

See also