/**
   * this function is called when the user wants to disconnect the device. This could happen if the
   * user choosen the wrong shimmer
   */
  private void disconnectDevice() {
    if (isDeviceConnected()) {
      serviceshim.disconnectShimmer(btAddress);
      serviceshim.stopStreaming(btAddress);
      serviceshim.setLogging(false, btAddress);
    } else
      Toast.makeText(ShimmerDevicesMenu.this, " No device to disconnect ", Toast.LENGTH_SHORT)
          .show();

    SystemClock.sleep(200);
    updateInterface();
  }