# 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 %}
