Fixed default setting bme.begin()

This commit is contained in:
mjs513 2017-09-12 07:35:36 -04:00
parent ba0bcdb599
commit 63357a0d5e
2 changed files with 11 additions and 3 deletions

View File

@ -61,6 +61,13 @@ bool Adafruit_BME280::begin(uint8_t addr, TwoWire *theWire)
return init();
}
bool Adafruit_BME280::begin(void)
{
_i2caddr = BME280_ADDRESS;
_wire = &Wire;
return init();
}
bool Adafruit_BME280::init()
{
// init I2C or SPI sensor interface

View File

@ -165,10 +165,11 @@ class Adafruit_BME280 {
Adafruit_BME280(void);
Adafruit_BME280(int8_t cspin);
Adafruit_BME280(int8_t cspin, int8_t mosipin, int8_t misopin, int8_t sckpin);
bool begin(void);
bool begin(TwoWire *theWire);
bool begin(uint8_t addr = BME280_ADDRESS);
bool begin(uint8_t addr = BME280_ADDRESS, TwoWire *theWire = &Wire);
bool begin(uint8_t addr);
bool begin(uint8_t addr, TwoWire *theWire);
bool init();
void setSampling(sensor_mode mode = MODE_NORMAL,