fsmeraldi / bleakheart

An asynchronous BLE Heart Monitor library with support for additional data from Polar monitors (ECG, accelerometers, etc)
Mozilla Public License 2.0
18 stars 11 forks source link
accelerometer asyncio ble ecg heart-rate heart-rate-monitor heart-rate-sensor heart-rate-variability

🖤 BleakHeart

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.

Installation

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.

Features

Usage

BleakHeart supports a variety of software design choices. Specifically:

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.

Limitations

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.

Credits and contributing

This software was developed by Fabrizio Smeraldi. If you would like to contribute, please get in touch.

Academic use

If you use this software for academic research, please reference this repository and let me know. I will cite your paper! :)

Disclaimer and license

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.

Resources