General ArduinoGravity

Air Pressure Sensor MPX5700AP SEN0456

userHead Rodri16 2024-03-08 16:35:21 84 Views0 Replies

Hi, I am using this pressure sensor and Arduino library. 

I would like to know what does ambient air pressure calibration do. It is possible to enable and disable when reading pressure value.

 

Is it a periodic air pressure calibration? Which value is used to calibrate?

 

*Get the ambient air pressure. Can set whether to enable calibration.

*1:Enable calibration 

*0:Not */  

Serial.print(mpx5700.getPressureValue_kpa(1)); 

 

on the library DFRobot_MPX5700.cpp I see that register 0x09 is written to 1 if calibration is enabled.

 

float DFRobot_MPX5700::getPressureValue_kpa(uint8_t ifcalibration)
{
 uint8_t buf[2];
 float voltage, Pressure;
 writeReg(0x09, &ifcalibration, 1);
 delay(100);
 readReg(0x06, buf,2);
 uint16_t Pressure_100 = ((uint16_t)buf[0] << 8) | (uint16_t)buf[1];
 return (Pressure_100/100.0);
}

 

Thanks