diff --git a/libraries/Bluefruit52Lib/examples/Peripheral/StandardFirmataBLE/StandardFirmataBLE.ino b/libraries/Bluefruit52Lib/examples/Peripheral/StandardFirmataBLE/StandardFirmataBLE.ino index f1c44878..a2f5cde2 100644 --- a/libraries/Bluefruit52Lib/examples/Peripheral/StandardFirmataBLE/StandardFirmataBLE.ino +++ b/libraries/Bluefruit52Lib/examples/Peripheral/StandardFirmataBLE/StandardFirmataBLE.ino @@ -861,7 +861,12 @@ void startAdv(void) void loop() { // Skip if not connected and bleuart notification is enabled - if ( !(Bluefruit.connected() && bleuart.notifyEnabled()) ) return; + if ( !(Bluefruit.connected() && bleuart.notifyEnabled()) ) + { + // go to low power mode since there is nothing to do + waitForEvent(); + return; + } byte pin, analogPin; diff --git a/libraries/Bluefruit52Lib/examples/Peripheral/custom_hrm/custom_hrm.ino b/libraries/Bluefruit52Lib/examples/Peripheral/custom_hrm/custom_hrm.ino index f40f0419..983d7fc2 100644 --- a/libraries/Bluefruit52Lib/examples/Peripheral/custom_hrm/custom_hrm.ino +++ b/libraries/Bluefruit52Lib/examples/Peripheral/custom_hrm/custom_hrm.ino @@ -222,9 +222,6 @@ void loop() // Only send update once per second delay(1000); - - // No need to call waitForEvent() here, it will be invoked by - // rtos_idle_callback() caused by above delay() } /**