# ADC: Digital values of the ECG signalecg_digital = [...]# n: Sampling resolution of the signal, by default 16-bitsampling_resolution = 16# VCC: the sensor's operating voltage of 3Vvcc = 3# Gecg: the sensor's gaingain = 1019
使用这些参数,将 ECG 信号转换回 mV 的传递函数如下:
# Convert ECG signal into mVecg = (ADC/2**(sampling_resolution-1) - 0.5) * vcc * gain