// 可调陷波器: 消除特定频率干扰 void setNotchFilter(float f_notch) { // 带通 + 全通 - 原信号 = 陷波 // 或使用Twin-T + 数字电位器 // 计算R值 float C = 10e-9; float R = 1 / (2 * PI * f_notch * C); // 设置3个数字电位器(Twin-T网络) setDigipot(POT1, calcValue(R)); setDigipot(POT2, calcValue(R)); setDigipot(POT3, calcValue(R/2)); }