SparkFun Pulse Oximeter and Heart Rate Monitor Hookup Guide

Contributors: Elias The Sparkiest
Favorited Favorite 7

Example 2: Config BPM Mode 2

As opposed to Example 1, In Example 2's setup, we give the argument MODE_TWO to bioHub.configBPM() to get more information from the SparkFun Pulse Oximeter and Heart Rate Monitor. Specifically we'll get an extended finger status and the R value of the blood oxygen data.

Serial.println("Configuring Sensor...."); 
int error = bioHub.configBpm(MODE_TWO); // Configuring just the BPM settings. 
    Serial.println("Sensor configured.");
else {
    Serial.println("Error configuring sensor.");
    Serial.print("Error: "); 

Simple right? Nothing else changes except that when we pull the data we now have access to more data: body.extStatus and body.rValue.

void loop(){

    // Information from the readBpm function will be saved to our "body"
    // variable.  
    body = bioHub.readBpm();
    Serial.print("Heartrate: ");
    Serial.print("Confidence: ");
    Serial.print("Oxygen: ");
    Serial.print("Status: ");
    Serial.print("Extended Status: ");
    Serial.print("Blood Oxygen R value: ");
    delay(250); // Slowing it down, we don't need to break our necks here.

Check the reference table above under Finger Status for more information on what each number means, there are eight. The R value refers to a correlation coefficient used to determine a statistical relationship between two variables: blood oxygen and a optical plate placed over the sensor. This does not refer to the glass shield on the sensor but rather a shield that would be placed over the sensor if you decided to implement this into a final product. In other words the company that manufactures this IC, Maxim Integrated has given the user a way to get faster FDA approval when using this IC in a final product. You can read more about that here. For those of us just tinkering in a project it has no Real value. Get it?