SparkFun Pulse Oximeter and Heart Rate Sensor - MAX30101 & MAX32664 doesn't work fine

Hello

Im working with Sensor Max30101 & MAX32664 using arduino uno r3 but when i try to get values a lot of time serial port show

Heartrate: 0

Confidence: 0

Oxygen: 0

Status: 3

My circuit are the following:

MFIO : Digital 5 on arduino uno R3

Rest : Digital 4 on arduino uno R3

GND : GND on arduino uno R3

3v3 : 3v3 on arduino uno R3

SCL : SCL on arduino uno R3

SDA : SDA on arduino uno R3

The code are the following:

#include <SparkFun_Bio_Sensor_Hub_Library.h>
#include <Wire.h>

// Reset pin, MFIO pin
int resPin = 4;
int mfioPin = 5;

// Takes address, reset pin, and MFIO pin.
SparkFun_Bio_Sensor_Hub bioHub(resPin, mfioPin); 

bioData body;  
// ^^^^^^^^^
// What's this!? This is a type (like int, byte, long) unique to the SparkFun
// Pulse Oximeter and Heart Rate Monitor. Unlike those other types it holds
// specific information on your heartrate and blood oxygen levels. BioData is
// actually a specific kind of type, known as a "struct". 
// You can choose another variable name other than "body", like "blood", or
// "readings", but I chose "body". Using this "body" varible in the 
// following way gives us access to the following data: 
// body.heartrate  - Heartrate
// body.confidence - Confidence in the heartrate value
// body.oxygen     - Blood oxygen level
// body.status     - Has a finger been sensed?


void setup(){

  Serial.begin(115200);

  Wire.begin();
  int result = bioHub.begin();
  if (result == 0) // Zero errors!
    Serial.println("Sensor started!");
  else
    Serial.println("Could not communicate with the sensor!!!");
 
  Serial.println("Configuring Sensor...."); 
  int error = bioHub.configBpm(MODE_ONE); // Configuring just the BPM settings. 
  if(error == 0){ // Zero errors!
    Serial.println("Sensor configured.");
  }
  else {
    Serial.println("Error configuring sensor.");
    Serial.print("Error: "); 
    Serial.println(error); 
  }

  // Data lags a bit behind the sensor, if you're finger is on the sensor when
  // it's being configured this delay will give some time for the data to catch
  // up. 
  Serial.println("Loading up the buffer with data....");
  
}

void loop(){

    // Information from the readBpm function will be saved to our "body"
    // variable.
   
    body = bioHub.readBpm();  
    Serial.print("Heartrate: ");
    Serial.println(body.heartRate); 
    Serial.print("Confidence: ");
    Serial.println(body.confidence); 
    Serial.print("Oxygen: ");
    Serial.println(body.oxygen); 
    Serial.print("Status: ");
    Serial.println(body.status); 
    // Slow it down or your heart rate will go up trying to keep up
    // with the flow of numbers
    delay(250);   
}

In a lot of test sometimes shows values but not a lot of time and a few minuts laters only show 0,0,3 again . Could you help me?

The sensor is very sensitive to the amount of pressure your finger is applying. Too much or too little pressure and the sensor won’t work. You will need to experiment to find the correct amount of pressure required to get stable readings.