> For the complete documentation index, see [llms.txt](https://sryvkver.gitbook.io/cobi.bike/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sryvkver.gitbook.io/cobi.bike/namespaces/ride-service/heart-rate.md).

# Heart Rate

Heart Rate — in bpm. Unifies all the sources for heart rate.&#x20;

When heart rate is reported from different sensors, only the most accurate one is reported on this property.

{% tabs %}
{% tab title="Typescript" %}

```typescript
const onHeartRateChange = (value: number, timestamp?: Date) => {
    console.log(value, timestamp);
};

COBI.rideService.heartRate.subscribe(onHeartRateChange);
COBI.rideService.heartRate.unsubscribe(onHeartRateChange);
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const onHeartRateChange = (value, timestamp) => {
    console.log(value, timestamp);
};

COBI.rideService.heartRate.subscribe(onHeartRateChange);
COBI.rideService.heartRate.unsubscribe(onHeartRateChange);
```

{% endtab %}
{% endtabs %}
