A low-cost telemeter has been developed for heart rate variability analysis by using the R–R intervals of an electrocardiogram to detect heart disease. The decreasing detection rate of the R-wave in long-term measurements was attributed to inadequate gain from the electrocardiogram. An automatic gain readjustment function was therefore developed to address this problem. In this study, we evaluated the discrimination rules by using a gain readjustment function and calculated the improvement factor for R-wave detection. The function was installed on an Android smartphone and measured by using 25 healthy subjects. The measurement results showed that the detection rate of the R-wave was improved by 16.3 before and after gain readjustment. Furthermore, the measurement results revealed the need for multiple gain readjustments to ensure the required performance. The gain value was acquired for seven subjects to examine the variation in the electrocardiogram amplitude after 5 and 7 h of measurement. Consequently, the electrocardiogram amplitude did not have adverse effects on the R-wave detection for the duration of these measurements.