SparkFun Pulse Oximeter and Heart Rate Monitor Hookup Guide
Example 3: AGC Settings
I won't break down this example code because you have all the necessary tools to get you started with the SparkFun Pulse Oximeter and Heart Rate Monitor. However, there are a few more settings to fine tune the Automatic Gain Control (AGC) algorithm that the MAX32664 Sensor uses to automatically adjust the MAX30101 on the fly. This particular algorithm is being used in the first example because it's turned on automatically with the
configBPM() function call. Configuring the sensor to give both sensor and biometric data (
configSensorBpm()) does not have this algorithm enabled and so relies on the default settings of the MAX30101 sensor, unless of course you have configured the pulse width and sample collection yourself. In Example 4 we talk about how to modify these values.