diff --git a/src/bmesensor.cpp b/src/bmesensor.cpp index deb8e45e..78298798 100644 --- a/src/bmesensor.cpp +++ b/src/bmesensor.cpp @@ -109,6 +109,8 @@ int bme_init(void) { finish: I2C_MUTEX_UNLOCK(); // release i2c bus access + if (rc) + bmecycler.attach(BMECYCLE, bmecycle); return rc; } // bme_init() diff --git a/src/main.cpp b/src/main.cpp index fb09f5b9..3674b6bb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -410,7 +410,6 @@ void setup() { // cyclic function interrupts sendcycler.attach(SENDCYCLE * 2, sendcycle); housekeeper.attach(HOMECYCLE, housekeeping); - bmecycler.attach(BMECYCLE, bmecycle); #if (TIME_SYNC_INTERVAL)