Skip to content

[iOS] Observe changes in heart rate through a Bluetooth heart rate monitor.

License

Notifications You must be signed in to change notification settings

ruddfawcett/Pulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pulse

Pulse is a simple library that provides a delegate method for changing heart rates from an attached Bluetooth heart rate monitor using Bluetooth LE.

Usage

To use Pulse, simply use the singleton to create a new instance.

let pulse = Pulse.sharedInstance
pulse.delegate = self

pulse.startListening()

Once Bluetooth is listening for devices, you can then keep up with the changes in heart rate through the delegate:

extension ViewController: PulseDelegate {
    func manager(didUpdate bpm: Int) {
        label.text = "BPM: \(bpm)"
    }
}

Check out the Xcode project for a complete example.

Installation

Copy the source from the Pulse folder to your project.

Attribution

I was first exposed to the intricacies of CoreBluetooth when I was working on another project of mine. Wanting to figure out how to use this technology with a heart rate monitor, I found this excellent tutorial on Ray Wenderlich written by Jawwad Ahmad and Steven Daniel.

Pulse simply builds upon their work, abstracting the project into a standalone library with a few modifications.

About

[iOS] Observe changes in heart rate through a Bluetooth heart rate monitor.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages