i2cWriteReadNonStop returned Error -1

[ 41874][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1

I am using altimeter sensor, MPL3115A2 for measuring the height, but I get the above error for output. Can anyone explained to me what is this error and how to solve this problem? I worry that the error will affect the height reading of the sensor.

Did you write the MPL3115A2 code yourself or are you using a library?

The only reference i Can find it


#include <Wire.h>
#include <Adafruit_MPL3115A2.h>

Adafruit_MPL3115A2 baro = Adafruit_MPL3115A2();

void setup() 

void loop() 
  Serial.println("\n\n========= Height of Flying Drone =========");

  if (! baro.begin()) 
    Serial.println("Invalid Input!!");

  float altm = baro.getAltitude();
  Serial.print(" meters\n");

This is my code.

I used the library, Adafruit_MPL3115A2.
FYI, the board that I am using is ESP32 dev board, and PlatformIO.

Is see, that uses the Adafruit I2C_Device abstraction layer instead. Please file an issue in https://github.com/adafruit/Adafruit_MPL3115A2_Library/issues with your error message.

Ok, already asked question there, thanks for helping <3