adafruit / Adafruit_BMP280_Library

Arduino Library for BMP280 sensors
253 stars 186 forks source link

Add option to set custom chipid #10

Closed garo closed 7 years ago

garo commented 7 years ago

Some BMP280 versions have different chipid than the currently hardcoded default 0x58. This patch adds the ability to set a custom chipid for the begin() function.

This is done by defining the default CHIPID in the header file and modifying the begin() function so that it gets the default chipid by default. This makes this change fully backwards compatible with all current library users.

I've personally found a BMP280 chip with chipid 0x60

ladyada commented 7 years ago

please compile code and verify it works before pull requests - your commit did not compile! :)