Always wait for I2C
This commit is contained in:
parent
5e27d3ebf4
commit
81e4f9901c
@ -467,12 +467,12 @@ void setup()
|
||||
if (mConfigured)
|
||||
{
|
||||
if (i2cEnable.get()) {
|
||||
strip.fill(strip.Color(0,128,0));
|
||||
strip.fill(strip.Color(0,64,0));
|
||||
strip.show();
|
||||
#ifdef BME680
|
||||
printf("Wait 1 second...\r\n");
|
||||
delay(1000);
|
||||
#endif
|
||||
strip.fill(strip.Color(0,128,0));
|
||||
|
||||
/* Extracted from library's example */
|
||||
mFailedI2Cinitialization = !bmx.begin();
|
||||
if (!mFailedI2Cinitialization) {
|
||||
@ -559,7 +559,6 @@ void loop()
|
||||
}
|
||||
|
||||
if (mButtonPressed > BUTTON_MAX_CYCLE) {
|
||||
mButtonPressed = (BUTTON_MAX_CYCLE -1);
|
||||
if (SPIFFS.exists("/homie/config.json")) {
|
||||
strip.fill(strip.Color(0,128,0));
|
||||
strip.show();
|
||||
|
Loading…
Reference in New Issue
Block a user