Collecting combined data at the same time from the multiple sensors connected
Hello,
I have written the code for collecting combined data at the same from the 2 sensors connected to the iOS device. Here is the following code:
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated);
device1.addObserver(self, forKeyPath: "state", options: NSKeyValueObservingOptions.New, context: nil)
device1.connectWithHandler { error in
}
device2.addObserver(self, forKeyPath: "state", options: NSKeyValueObservingOptions.New, context: nil)
device2.connectWithHandler { error in
}
But I am unable to connect 2 Metawear sensors at the same time and then getting the data from them.
Please guide.
This discussion has been closed.
Comments
case .Connected:
self.deviceStatus.text = "Connected";
case .Connecting:
self.deviceStatus.text = "Connecting";
.
.
.
}
Similarly, switch case for device2.