1. 运行效果
2. 新建修复心率误差.py
代码如下:
from machine import sleep, SoftI2C, Pin, Timer
from utime import ticks_diff, ticks_us
from max30102 import MAX30102, MAX30105_PULSE_AMP_MEDIUM
from hrcalc import calc_hr_and_spo2
BEATS = 0 # 存储心率
FINGER_FLAG = False # 默认表示未检测到手指
SPO2 = 0 # 存储血氧
TEMPERATURE = 0 # 存储温度
# ------------ 添加新代码 -----------
HREAT_LIST = [] # 存储心率的最新30次数据
SPO2_LIST