Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maximbilan/ios-heart-rate-monitor

iOS Heart Rate Monitor
https://github.com/maximbilan/ios-heart-rate-monitor

health heart-rate ios ios-app monitor objective-c

Last synced: 3 months ago
JSON representation

iOS Heart Rate Monitor

Awesome Lists containing this project

README

        

iOS Heart Rate Monitor
======================

The sample for working with heart rate devices was tested on Alpha MIO devices.

Based on https://github.com/liquidx/CoreBluetoothPeripheral and https://github.com/timburks/iOSHeartRateMonitor sources.

## Using

Add to your project the next source files:


HeartRateMonitor.h
HeartRateMonitor.m


You should use the HeartRateMonitorDelegate protocol.

For example:


@interface ViewController : UIViewController <HeartRateMonitorDelegate>

@end


And then you should implement the next methods:


// Returns value from device in real time
- (void)updateHRM:(NSString *)data;

// Called when scanning timeout occured
- (void)scanningDidTimeout;

// Called when connection timeout occured
- (void)connectionDidTimeout;

// Called when disconnection occured
- (void)disconnection;

Initialization:


HeartRateMonitor *heartRateMonitor = [[HeartRateMonitor alloc] init];
heartRateMonitor.hrmDelegate = self;

For start scanning:


[heartRateMonitor startScan];

For stopping:


[heartRateMonitor stopScan];