Warnings on Wire.requestfrom(unt8_t, uint8_t, bool)

Why does the original Wire library produce such strange warnings? I followed the description on the official Arduino site. Someone should do something!

Arduino IDE 2.2.1
Processor Arduino Nano

My Wire instructions:

Wire.beginTransmission(MPUaddr);
Wire.write(gyroZ);
Wire.endTransmission(false);
Wire.requestFrom(MPUaddr, 2, true);

The warnings (all in red):
D:\Arduino\ERO_Balancer\Tests\MotorTestBt\MotorTestBt.ino: In function 'void CalibrateGyro()':
D:\Arduino\ERO_Balancer\Tests\MotorTestBt\MotorTestBt.ino:227:36: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
Wire.requestFrom(MPUaddr, 2, true);
^
In file included from D:\Arduino\ERO_Balancer\Tests\MotorTestBt\MotorTestBt.ino:28:0:
C:\Users\Rudol\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:69:13: note: candidate 1: uint8_t TwoWire::requestFrom(int, int, int)
uint8_t requestFrom(int, int, int);
^~~~~~~~~~~
C:\Users\Rudol\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:66:13: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t, uint8_t)
uint8_t requestFrom(uint8_t, uint8_t, uint8_t);
^~~~~~~~~~~

OK, I've now seen that it's an old "problem". I'll solve it for myself.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.