Activate I2C after powering the sensor
This commit is contained in:
parent
6af6a6ac76
commit
5ece74b0e6
@ -403,8 +403,6 @@ void setup()
|
|||||||
.setDatatype("integer");
|
.setDatatype("integer");
|
||||||
|
|
||||||
strip.begin();
|
strip.begin();
|
||||||
/* activate I2C for BOSCH sensor */
|
|
||||||
Wire.begin(SENSOR_I2C_SDI, SENSOR_I2C_SCK);
|
|
||||||
|
|
||||||
mConfigured = Homie.isConfigured();
|
mConfigured = Homie.isConfigured();
|
||||||
digitalWrite(WITTY_RGB_G, HIGH);
|
digitalWrite(WITTY_RGB_G, HIGH);
|
||||||
@ -415,6 +413,10 @@ void setup()
|
|||||||
printf("Wait 1 second...\r\n");
|
printf("Wait 1 second...\r\n");
|
||||||
delay(1000);
|
delay(1000);
|
||||||
#endif
|
#endif
|
||||||
|
/* activate I2C for BOSCH sensor */
|
||||||
|
Wire.begin(SENSOR_I2C_SDI, SENSOR_I2C_SCK);
|
||||||
|
printf("Wait 50 milliseconds...\r\n");
|
||||||
|
delay(50);
|
||||||
/* Extracted from library's example */
|
/* Extracted from library's example */
|
||||||
mFailedI2Cinitialization = !bmx.begin();
|
mFailedI2Cinitialization = !bmx.begin();
|
||||||
if (!mFailedI2Cinitialization) {
|
if (!mFailedI2Cinitialization) {
|
||||||
|
Loading…
Reference in New Issue
Block a user