Measure the heart rate