MKRIoTCarrier Env.readPressure() Not Found

Hi-

Looking for some help here. The documentation for the MKR IoT Carrier states there is a 'readPressure()' method available.

When trying to call this function the IDE raises an error stating 'Compilation error: 'class EnvClass' has no member named 'readPressure'; did you mean 'readTemperature'?'.

I have version 2.1.0 installed and looking at the github repo there is not a function 'readPressure', like the error describes.

Wondering if I'm doing something wrong, the documentation is wrong, or if there is a different way of reading the pressure from the sensor.

any guidance would be helpful.

Code reference:

#include <Arduino_MKRIoTCarrier.h>

MKRIoTCarrier carrier;

//Config Values
const byte MAX_SAMPLES = 254;
const byte SAMPLE_RATE_SEC = 1;
//Global Vars
float pressureHistory[MAX_SAMPLES];
int loopCount = 0;

void setup() {
  Serial.begin(9600);
  // Tell the carrier its in the case to set sensitivity of the inputs
  //carrier.withCase();
  carrier.noCase();
  // Starts the board
  carrier.begin();

  Initialize();

}

void Initialize(){
  float p = carrier.Env.readPressure();
  for(int i = 0; i <= MAX_SAMPLES; i++){
    pressureHistory[i] = p;
  }
}

Hi @mrchrisosburn. I apologize for the confusion caused by the error in the documentation.

It should be carrier.Pressure.readPressure() instead of carrier.Env.readPressure() as incorrectly claimed in the documentation:

float p = carrier.Pressure.readPressure();

Thanks @ptillisch

Have a good rest of your day!

You are welcome. I'm glad if I was able to be of assistance.

Regards, Per