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