adafruit_ble_heart_rate

BLE Heart Rate Service

  • Author(s): Dan Halbert for Adafruit Industries

The Heart Rate Service is specified here: https://www.bluetooth.com/wp-content/uploads/Sitecore-Media-Library/Gatt/Xml/Services/org.bluetooth.service.heart_rate.xml

Implementation Notes

Hardware:

class adafruit_ble_heart_rate.HeartRateMeasurementValues(heart_rate, contact, energy_expended, rr_intervals)

Namedtuple for measurement values.

For example:

bpm = svc.measurement_values.heart_rate
contact

Alias for field number 1

energy_expended

Alias for field number 2

heart_rate

Alias for field number 0

rr_intervals

Alias for field number 3

class adafruit_ble_heart_rate.HeartRateService(service=None)

Service for reading from a Heart Rate sensor.

location

The location of the sensor on the human body, as a string.

Note that the specification describes a limited number of locations. But the sensor manufacturer may specify using a non-standard location. For instance, some armbands are meant to be worn just below the inner elbow, but that is not a prescribed location. So the sensor will report something else, such as “Wrist”.

Possible values are: “Other”, “Chest”, “Wrist”, “Finger”, “Hand”, “Ear Lobe”, “Foot”, and “InvalidLocation” (if value returned does not match the specification).

measurement_values

All the measurement values, returned as a HeartRateMeasurementValues namedtuple.

Return None if no packet has been read yet.