Skip to content

Receive data from Mio Alpha in openFrameworks (only OS X 10.7- / iOS 5-)

License

Notifications You must be signed in to change notification settings

2bbb/ofxMioAlpha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ofxMioAlpha

How to use

  1. Add IOBluetooth.framework (or CoreBluetooth.framework on iOS) to your project
  2. Include ofxMioAlpha.h

API

ofxMioAlpha

  • 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.

ofxMioAlphaInterface

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);

Update history

ver 0.01 [beta] release

maybe buggy now...

ver 0.02 [beta] release

maybe corresponded to iOS.

License

MIT License.

Author

Special Thanks

At the last

Please create new issue, if there is a problem.

And please throw pull request, if you have a cool idea!!

About

Receive data from Mio Alpha in openFrameworks (only OS X 10.7- / iOS 5-)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published