BMP280-arduino-library icon indicating copy to clipboard operation
BMP280-arduino-library copied to clipboard

Error compiling library

Open kratochviljan opened this issue 9 years ago • 4 comments

BMP280.cpp: In member function char BMP280::begin(int, int)

BMP280.cpp: 33:26: error: no matching function for call to 'TwoWire::begin(int&, int&) Wire.begin(sdaPin,sclPin) BMP280.cpp:33: note candidates are

BMP280.cpp:19: In file included from Wire.h:52: note void TwoWire begin() void begin() Wire.h:52: note candidate expects 0 arguments, 2 provided Wire.h:53: note void TwoWire begin(uint8_t) void begin(uint8_t) Wire.h:53: note candidate expects 1 argument, 2 provided Wire.h:54: note void TwoWire begin(int) void begin(int) Wire.h:54: note candidate expects 1 argument, 2 provided Error compiling libraries

This is probably caused by later "optimization" for ESP8266, where wire.begin require two pin numbers for SDA and SCL. On Arduino this is not working.

kratochviljan avatar Nov 04 '16 19:11 kratochviljan

have the same problem.. @kratochviljan did you find a solution?

michaelw3 avatar Dec 03 '16 18:12 michaelw3

Yes, use this library, it is working fine -> https://github.com/adafruit/Adafruit_BMP280_Library :-)

kratochviljan avatar Dec 03 '16 22:12 kratochviljan

Same issue here

maopiccoto avatar Jul 06 '17 23:07 maopiccoto

Having the same issue - make sure you don't have a copy of Wire.h or the older Wire libraries in your Arduino/libraries folder. That should be part of the core of your platform/ide/package files now. Wire.h has been updated recently and if the wrong one is being picked up, you'll run into this error. I didn't realize what the problem was until I hit this forum and rechecked my log to see it pointing to the .../Arduino/libraries/Wire/Wire.h instead of my packages tree. I've run into this before with the Robot* and Servo* libraries which were also internalized. TinyWireM also gave me a fuss. (I just zip them up in case I ever need to go retro then delete the folder)

treii28 avatar Oct 15 '17 00:10 treii28