sparkfun / BMP180_Breakout

Breakout board for the Bosch BMP180 barometric pressure sensor
Other
69 stars 101 forks source link

Support for other instances of the library 'Wire.h' #13

Closed AsafeSilva closed 6 years ago

AsafeSilva commented 6 years ago

Small changes to support the use of other instances of the 'Wire.h' library, such as 'Wire1' in Arduino DUE

mgrusin commented 6 years ago

Thanks for your contributions!

nseidle commented 6 years ago

AsafeSilva - Thank you! In the future, have a look at how we did this on the BME280 library. Your approach is sound but please consider passing by reference on your next PR ( ;) ). That way user does a

SFE_BMP180 pressure(Wire1);

We like to follow the Arduino API guide as much as possible. The use of & can confuse some users.

Also, we built in softwareWire support in the BME280 library. It's not ideal so if you have a better way of allowing users to use softwareWire ports we'd enjoy hearing different approaches.