handle BLE disconnection and use of Scheduler.delay for better task switching