iosbrain / Core-Bluetooth-HRM

An Xcode 9 project written in Swift 4 code to communicate with a wearable heart rate monitor using the Core Bluetooth framework.
MIT License
3 stars 1 forks source link

Question #1

Open moisebc opened 5 years ago

moisebc commented 5 years ago

Hi,

I try to figure out how to write/read the heart rate from Apple Watch as frequent as possible. And from all the things which I saw in the last two months, you are the only one who shows a write and read heart rate every second from Apple Watch (from here https://www.appcoda.com/healthkit/ ) image

I used your code and the results are not the same. I think you use the func writeHeartRateData from HealthKitInterface but you don't use it in github example.

Could you help me with this, please?

Thx,

Bogdan

iosbrain commented 4 years ago

Bogdan:

My code doesn't show a write and read of a heart rate value every second from Apple Watch. It only reads heart rate values from a Polar H7 and Scoche Rhythm+ heart rate monitors, which both send a heart beats per minute value about every second. These two devices are Bluetooth Smart (Low Energy) devices which broadcast the heart rate data they collect publicly.

I only showed you how to store and retrieve data from those devices in HealthKit.

I never used an Apple Watch as a heart rate monitor. To the best of my knowledge, Apple Watch cannot be expected to read heart rate data consistently and/or every second.

Thanks for your interest in my code