// Optionally pass in a explicit Bluetooth Device to use private void Awake() { sensor = new LpmsB2(this); BluetoothAdapter.askEnableBluetooth(); BluetoothAdapter.OnDeviceOFF += HandleOnDeviceOff; BluetoothAdapter.OnDevicePicked += HandleOnDevicePicked; BluetoothAdapter.OnDisconnected += HandleOnDisconnected; BluetoothAdapter.OnReadingStarted += HandleOnReadingStarted; BluetoothAdapter.OnReadingStoped += HandleOnReadingStopped; CheckForSavedDevice(); }
private void Start() { Sensor = new LpmsB2(this); CheckForSavedSensor(); }