Seeed-Studio / Grove_BMP280

MIT License
7 stars 11 forks source link

Arduino Uno Wifi Rev2 - init doesnt work / not able to read #5

Open bobbysmith007 opened 3 years ago

bobbysmith007 commented 3 years ago

This line in init is never returning anything but 0. Init is being called with no arguments so I am not sure where its getting that address since it is not being passed in explicitly. I am new to all this stuff and this sensor is on my by Arduino Sensor Kit Base

//     _devAddr = i2c_addr;  = 119 or 0x77
chip_id = bmp280Read8(BMP280_REG_CHIPID);

It never seems to be able to read anything (getTemperature() and getPressure() are always 0).

ackPeng commented 1 week ago

@bobbysmith007 In the Seeed_BMP280.h file, in bool init(int i2c_addr = BMP280_ADDRESS);, you can see the default address. Please confirm whether this address matches your device.