This document presents a method for detecting R-peaks in an electrocardiogram (ECG) signal using thresholding to measure heart rate. The method analyzes ECG data from the MIT-BIH Arrhythmia Database using MATLAB. It detects R-peaks by applying amplitude thresholds to identify peaks above neighboring samples and a minimum amplitude. Detected R-peaks are used to calculate the average RR interval and classify heart rate as normal, bradycardia (slow), or tachycardia (fast). The method is tested on several ECG records and can approximate results quickly but has limitations and is not intended for diagnosis due to potential missed detections of flattened R-peaks.