max30100 heartbeat not Detected ..?

Hello
I trying this example:
PULSE OXIMETER for EMERGENCY use during CORONAVIRUS DISEASE - Arduino Project Hub
and i want to add blynk and thingspeak to it, so when detect the heartbeat and SpO2 it send the data to blynk and thingspeak but the max30100 don’t detect the heartbeat and SpO2 when i combine the code i don’t know why i look here in the forum but no lock, l’m using this haradware:

Arduino Nano 33 IoT
MAX30100
OLED display module 0.96

this the code i’m working with:

#include <Wire.h>
#include "MAX30100_PulseOximeter.h"
#include <U8g2lib.h>

#define REPORTING_PERIOD_MS      1000
#define PULSE_WIDTH              MAX30100_SPC_PW_1600US_16BITS
#define IR_LED_CURRENT           MAX30100_LED_CURR_40MA
#define LED_CURRENT              MAX30100_LED_CURR_20_8MA
#define SAMPLING_RATE            MAX30100_SAMPRATE_100HZ
//#define MAX30100_I2C_ADDRESS     0x57

//-------------

#define BLYNK_PRINT Serial
#define BLYNK_MAX_SENDBYTES 256 // Default is 128
#include <SPI.h>
#include <WiFiNINA.h>
#include <BlynkSimpleWiFiNINA.h>

//--------------

#include "ThingSpeak.h"

#define SECRET_SSID "xxxxxxx"    // replace MySSID with your WiFi network name
#define SECRET_PASS "xxxxxxx*" // replace MyPassword with your WiFi password

#define SECRET_CH_ID xxxxxxx      // replace 0000000 with your channel number
#define SECRET_WRITE_APIKEY "xxxxxxx"   // replace XYZ with your channel write API Key
//********************************************************************

U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0);
PulseOximeter pox;
MAX30100 sensor;

char ssid[] = SECRET_SSID;    //  your network SSID (name)
char pass[] = SECRET_PASS;   // your network password
int keyIndex = 0;            // your network key Index number (needed only for WEP)

BlynkTimer timer;
WiFiClient  client;

unsigned long myChannelNumber = SECRET_CH_ID;
const char * myWriteAPIKey = SECRET_WRITE_APIKEY;

//// Initialize our values
//int pox.getHeartRate() = 0;
//int pox.getSpO2() = 0;
//String myStatus = "";

uint32_t tsLastReport = 0;
uint32_t last_beat = 0;
bool initialized = false;
int HRclean;
int SpO2;

unsigned long previousMillis=0;
const long interval=1000;
volatile boolean heartBeatDetected = false;

void onBeatDetected()
{
  show_beat();
  last_beat = millis();
  Serial.println("Beat!");
}

void show_beat()
{
  u8g2.setFont(u8g2_font_cursor_tr);
  u8g2.setCursor(118, 10);
  u8g2.print("_");
  u8g2.sendBuffer();
}

void initial_display()
{
  if (not initialized)
  {
    u8g2.clearBuffer();
    u8g2.setCursor(15, 12);
    u8g2.setFont(u8g2_font_crox2hb_tr);
    u8g2.print("Project 2");
    u8g2.setFont(u8g2_font_crox2h_tr);
    u8g2.setCursor(30, 29);
    u8g2.print("Initializing...");
    u8g2.sendBuffer();
    delay(4000);

    initialized = true;

    u8g2.clearBuffer();
    u8g2.setFont(u8g2_font_crox2hb_tr);
    if (!pox.begin()) {
      u8g2.setCursor(40, 12);
      u8g2.print("FAILED");
      u8g2.setCursor(15, 29);
      u8g2.print("Check Sensor !");
      u8g2.sendBuffer();
      for (;;);
    } else {
      u8g2.setCursor(20, 12);
      u8g2.print("INITIALIZED");
      u8g2.setCursor(0, 29);
      u8g2.print("Wear the Sensor...");
      u8g2.sendBuffer();
    }
    delay(2000);
  }
}


//----------------

//// You should get Auth Token in the Blynk App.
//// Go to the Project Settings (nut icon).
char auth[] = "xxxxxxxx";

//----------------



//********************************************************************

void setup()
{
  Serial.begin(115200);
 // pox.begin();
  u8g2.begin();
  Blynk.begin(auth, ssid, pass);

  initial_display();

  Serial.print("Initializing pulse oximeter..");

  pox.setIRLedCurrent(LED_CURRENT);
  sensor.setMode(MAX30100_MODE_SPO2_HR);
  sensor.setLedsPulseWidth(PULSE_WIDTH);
  sensor.setSamplingRate(SAMPLING_RATE);

  //-------------------


  // Initialize the PulseOximeter instance
  // Failures are generally due to an improper I2C wiring, missing power supply
  // or wrong target chip
  if (!pox.begin()) {
    Serial.println("FAILED");
    for (;;);
  } else {
    Serial.println("SUCCESS");
  }

  // The default current for the IR LED is 50mA and it could be changed
  //   by uncommenting the following line. Check MAX30100_Registers.h for all the
  //   available options.
  pox.setIRLedCurrent(MAX30100_LED_CURR_7_6MA);

  // Register a callback for the beat detection
  pox.setOnBeatDetectedCallback(onBeatDetected);

  //-------------


  //--------------

  // check for the WiFi module:
  if (WiFi.status() == WL_NO_MODULE) {
    Serial.println("Communication with WiFi module failed!");
    // don't continue
    while (true);
  }


  ThingSpeak.begin(client);  //Initialize ThingSpeak

  //--------


}
//********************************************************************

void max30100 ()
{
  //pox.update();
  HRclean = pox.getHeartRate();
  SpO2 = pox.getSpO2();
  if ((millis() - tsLastReport > REPORTING_PERIOD_MS) and (HRclean > 30 and HRclean<220 and SpO2>30 and SpO2 < 100)) {
    u8g2.clearBuffer();
    u8g2.setFont(u8g2_font_crox2h_tr);
    u8g2.setCursor(0, 12);
    u8g2.print("HR");
    u8g2.setCursor(75, 12);
    u8g2.print("Bpm");
    u8g2.setCursor(0, 30);
    u8g2.print("SpO2 ");
    u8g2.setCursor(75, 30);
    u8g2.print("%");
    u8g2.setFont(u8g2_font_fub11_tf);
    u8g2.setCursor(45, 12);
    u8g2.print(HRclean);
    u8g2.setCursor(45, 30);
    u8g2.print(SpO2);
    u8g2.setFont(u8g2_font_cursor_tr);
    u8g2.setCursor(118, 10);
    u8g2.print("^");
    u8g2.sendBuffer();



//   tsLastReport = millis();
 }

    Serial.print("Heart rate:");
    Serial.print(pox.getHeartRate());
    Serial.print("bpm / SpO2:");
    Serial.print(SpO2);
    Serial.println("%");
}

void Blynkapp()
{
//  if (pox.getHeartRate() > 0)
//  {
    Blynk.virtualWrite(5, pox.getHeartRate());
    Blynk.virtualWrite(4, pox.getSpO2());
//  }
}

void ThingSpeakup()
{
  // Connect or reconnect to WiFi
    if(WiFi.status() != WL_CONNECTED){
      Serial.print("Attempting to connect to SSID: ");
      Serial.println(SECRET_SSID);
      while(WiFi.status() != WL_CONNECTED){
        WiFi.begin(ssid, pass); // Connect to WPA/WPA2 network. Change this line if using open or WEP network
        Serial.print(".");
        delay(5000);
      }
      Serial.println("\nConnected.");
    }

  // Write to ThingSpeak. There are up to 8 fields in a channel, allowing you to store up to 8 different
  // pieces of information in a channel.  Here, we write to field 1.
  if (pox.getHeartRate() > 0)
  {
  int x = ThingSpeak.writeField(myChannelNumber, 1, pox.getHeartRate(), myWriteAPIKey);
  if (x == 200) {
    Serial.println("Channel update successful.");
  }
  else {
    Serial.println("Problem updating channel. HTTP error code " + String(x));
  }
  }
  //  // change the value
  //  number++;
  //  if(number > 99){
  //    number = 0;
  //  }

  delay(2000); // Wait 20 seconds to update the channel again

}

void loop()
{
  pox.update();
  delay(2000);
  max30100 ();
  Blynkapp();
  ThingSpeakup();


}

can you please help me ?

Any help ?