An asynchronous BLE Heart Monitor library that supports additional measurements (such as ECG and accelerometer data) available from Polar sensors through the Polar Measurement Data interface.
BleakHeart is written in Python using the asyncio framework; BLE communication is based on Bleak.
Place the bleakheart.py
file in the same directory as your program, or in a directory in your PYTHONPATH
.
BleakHeart requires Bleak; the current version was tested with Bleak v0.20.2.
BleakHeart supports a variety of software design choices. Specifically:
asyncio
;Please see the examples directory for detailed examples of some of the possible workflows, and use the help
function on BleakHeart objects for more information.
BleakHeart has only been tested on a Polar H10 chest strap (under Linux), since that is what I have available. Other Polar devices are only partly supported; measurements other than ECG and acceleration are returned as raw bytearrays. Offline recording to the internal Polar H10 memory is not supported.
This software was developed by Fabrizio Smeraldi. If you would like to contribute, please get in touch.
If you use this software for academic research, please reference this repository and let me know. I will cite your paper! :)
Polar is a trademark of Polar Electro Oy; Bleak is an open-source BLE library developed by Henrik Blidh. The author is not affiliated with either.
This software is provided subject to the terms of the Mozilla Public License version 2.0, in the hope that it will be useful; see the LICENSE
file for details.