Adafruit_MPL3115A2_Library
Adafruit_MPL3115A2_Library copied to clipboard
[ 41874][E][Wire.cpp:499] requestFrom(): 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.
Code: #include <Wire.h> #include <Adafruit_MPL3115A2.h>
Adafruit_MPL3115A2 baro = Adafruit_MPL3115A2();
void setup() { Serial.begin(9600); }
void loop() { Serial.println(“\n\n========= Height of Flying Drone =========”);
if (! baro.begin()) { Serial.println(“Invalid Input!!”); return; }
float altm = baro.getAltitude(); Serial.print(altm); Serial.print(" meters\n"); delay(1000); }
This is my code.
I used the library, Adafruit_MPL3115A2. FYI, the board that I am using is ESP32 dev board, and platformio