- Add IOBluetooth.framework (or CoreBluetooth.framework on iOS) to your project
- Include ofxMioAlpha.h
- void setup(ofxMioAlphaInterface *interface = NULL);
you can use interface, if you create custom callback reciver class that inherits ofxMioAlphaInterface. default is NULL, that means only ofxMioAlpha instance receives callback.
- void addDeviceUUID(const string &uuid);
add uuid of Mio device that you want to connect. this uuid becomes the key to pull data from ofxMioAlpha instance and identifies data in receive callback.
- bool startScan();
start to scan devices. true is returned when it succeeds.
- void stopScan();
stop scanning the device.
- void disconnect();
disconnect all devices.
- vector getLatestHeartBeatsFromDevice(const string &uuid);
get latest heart rates receive from device that has uuid.
- bool isConnectedToDevice(const string &uuid) const;
get latest connection status of device that has uuid.
this is abstract interface of callback receiver. you create class inherits this class, if you want to custom callback receiver.
- virtual void receiveHeartRate(const string &uuid, int heartRate);
- virtual void updateConnectionState(const string &uuid, bool isConnected);
maybe buggy now...
maybe corresponded to iOS.
MIT License.
- ISHII 2bit [bufferRenaiss co., ltd.]
- ishii[at]buffer-renaiss.com
Please create new issue, if there is a problem.
And please throw pull request, if you have a cool idea!!