You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, when I compile a sketch with Arduino IDE I receive the following warning:
In file included from ...\Arduino\libraries\SparkFun_MPL3115A2_Altitude_and_Pressure_Sensor_Breakout\src\SparkFunMPL3115A2.cpp:36:0:
...\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h: In member function 'float MPL3115A2::readAltitude()':
...\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:68:13: note: candidate 1: uint8_t TwoWire::requestFrom(int, int)
uint8_t requestFrom(int, int);
^~~~~~~~~~~
...\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:65:13: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t)
uint8_t requestFrom(uint8_t, uint8_t);
^~~~~~~~~~~
I would like to suggest to change the call requestFrom to use number in uint8_t format. _I2Caddress is already in right format, so second parameter must to be modified.
Example:
if (_i2cPort->requestFrom(_I2Caddress, 3) != 3) { // Request three bytes
return -999;
}
become
if (_i2cPort->requestFrom(_I2Caddress, 0x03) != 3) { // Request three bytes
return -999;
}
The text was updated successfully, but these errors were encountered:
Hi, when I compile a sketch with Arduino IDE I receive the following warning:
I would like to suggest to change the call requestFrom to use number in uint8_t format. _I2Caddress is already in right format, so second parameter must to be modified.
Example:
become
The text was updated successfully, but these errors were encountered: