ARDUINO DUE -HeartBeat Pulse Sensor

Good evening ,
As part of my dissertation I have undertaken to design a tele-monitoring system for the health of the elderly that will monitor basic biomedical parameters.Now at a later stage I want to do the same using the pulse heartbeat sensor. I have installed the corresponding library that is needed and I managed locally in the serial plotter to see the waveform of the heartbeat from the examples that this library has. When I go to upload the code in the same way that theoretically shows me the values ​​of my heart rate on the serial monitor, I get an error as shown in the photo below (from what I understood about interrupts-I do not know exactly what it is). I have the Arduino Due board at my disposal, if that plays a role.
Do you know where you owe this error and how I could fix it ??
It is very important for me to be able to complete my dissertation. Thank you very much in advance for everything and for the time you have allocated.
Whatever you need I am at your disposal

Post text, not pictures.
We are not Ancient Egyptians

The DUE is not supported by this software as it is written. Do little research into how to disable/enable the interrupts on the DUE.

Thank you veru much for your promt response
because i am amateur in this field . Can you help me with this ??How can i enable or disable interupts??

Have you tried substituting "interrupts()" and "noInterrupts()"?

Please, post a link to the sensor and its library you are using.

https://pulsesensor.com/ that is the link about the sensor
and the library is PulseSensor Playground which contains some examples

can you help me where to substitute that mandate because i dont know??
The example contains '' #define USE_ARDUINO_INTERRUPTS''
if you want , i can share the whole code

It might help speed things along.

1. This is the response (the sensor provides analog signal which I simulated at A0-pin) of the sensor on the Serial Monitor of UNO with the quoted defined expression. It must be in the sketch though the example sketch (Getting_BPM_to_Monitor.ino) does not contain it explicitly.

BPM: 218
♥  A HeartBeat Happened ! 
BPM: 172
♥  A HeartBeat Happened ! 
BPM: 109
♥  A HeartBeat Happened ! 
BPM: 91
♥  A HeartBeat Happened ! 
BPM: 82
♥  A HeartBeat Happened ! 

2. I am still struggling to get it compiled on the DUE Board!

This is the example sketch of the Library.

/*  Getting_BPM_to_Monitor prints the BPM to the Serial Monitor, using the least lines of code and PulseSensor Library.
 *  Tutorial Webpage: https://pulsesensor.com/pages/getting-advanced
 *
--------Use This Sketch To------------------------------------------
1) Displays user's live and changing BPM, Beats Per Minute, in Arduino's native Serial Monitor.
2) Print: "♥  A HeartBeat Happened !" when a beat is detected, live.
2) Learn about using a PulseSensor Library "Object".
4) Blinks LED on PIN 13 with user's Heartbeat.
--------------------------------------------------------------------*/

#define USE_ARDUINO_INTERRUPTS true    // Set-up low-level interrupts for most acurate BPM math.
#include <PulseSensorPlayground.h>     // Includes the PulseSensorPlayground Library.   

//  Variables
const int PulseWire = 0;       // PulseSensor PURPLE WIRE connected to ANALOG PIN 0
const int LED13 = 13;          // The on-board Arduino LED, close to PIN 13.
int Threshold = 550;           // Determine which Signal to "count as a beat" and which to ignore.
                               // Use the "Gettting Started Project" to fine-tune Threshold Value beyond default setting.
                               // Otherwise leave the default "550" value. 
                               
PulseSensorPlayground pulseSensor;  // Creates an instance of the PulseSensorPlayground object called "pulseSensor"

void setup() 
{   
  Serial.begin(9600);          // For Serial Monitor

  // Configure the PulseSensor object, by assigning our variables to it. 
  pulseSensor.analogInput(PulseWire);   
  pulseSensor.blinkOnPulse(LED13);   //auto-magically blink Arduino's LED with heartbeat.
  pulseSensor.setThreshold(Threshold);   

  // Double-check the "pulseSensor" object was created and "began" seeing a signal. 
   if (pulseSensor.begin()) {
    Serial.println("We created a pulseSensor Object !");  //This prints one time at Arduino power-up,  or on Arduino reset.  
  }
}

void loop() 
{
 int myBPM = pulseSensor.getBeatsPerMinute();  // Calls function on our pulseSensor object that returns BPM as an "int".
                                               // "myBPM" hold this BPM value now. 

if (pulseSensor.sawStartOfBeat()) 
{            // Constantly test to see if "a beat happened". 
 Serial.println("♥  A HeartBeat Happened ! "); // If test is "true", print a message "a heartbeat happened".
 Serial.print("BPM: ");                        // Print phrase "BPM: " 
 Serial.println(myBPM);                        // Print the value inside of myBPM. 
}
  delay(20);                    // considered best practice in a simple sketch.
}

I guess you didn't read the topic title

#define USE_ARDUINO_INTERRUPTS true // Set-up low-level interrupts for most acurate BPM math.
#include <PulseSensorPlayground.h> // Includes the PulseSensorPlayground Library.

// Variables
const int PulseWire = 0; // PulseSensor PURPLE WIRE connected to ANALOG PIN 0
const int LED13 = 13; // The on-board Arduino LED, close to PIN 13.
int Threshold = 550; // Determine which Signal to "count as a beat" and which to ignore.
// Use the "Gettting Started Project" to fine-tune Threshold Value beyond default setting.
// Otherwise leave the default "550" value.

PulseSensorPlayground pulseSensor; // Creates an instance of the PulseSensorPlayground object called "pulseSensor"

void setup() {

Serial.begin(9600); // For Serial Monitor

// Configure the PulseSensor object, by assigning our variables to it.
pulseSensor.analogInput(PulseWire);
pulseSensor.blinkOnPulse(LED13); //auto-magically blink Arduino's LED with heartbeat.
pulseSensor.setThreshold(Threshold);

// Double-check the "pulseSensor" object was created and "began" seeing a signal.
if (pulseSensor.begin()) {
Serial.println("We created a pulseSensor Object !"); //This prints one time at Arduino power-up, or on Arduino reset.
}
}

void loop() {

int myBPM = pulseSensor.getBeatsPerMinute(); // Calls function on our pulseSensor object that returns BPM as an "int".
// "myBPM" hold this BPM value now.

if (pulseSensor.sawStartOfBeat()) { // Constantly test to see if "a beat happened".
Serial.println(":heart: A HeartBeat Happened ! "); // If test is "true", print a message "a heartbeat happened".
Serial.print("BPM: "); // Print phrase "BPM: "
Serial.println(myBPM); // Print the value inside of myBPM.
}

delay(20); // considered best practice in a simple sketch.

}

// So here is the whole code. Because i dont know , what i have to substitute in order to upload this code in Arduino Due??

Yes that is my main problem. I don't know what to modify in code in order to upload it in arduino Due,because when i try to upload this code i get error.

Please if you find something or manage it , informe me.

I know that the OP has the problem to operate the sensor using Arduino DUE which I recognize as I am facing the same problem (Post-10). However, the sketch works well with Arduino UNO.

Really ?? So i can't use this sensor with Arduino Due ?? Are you sure??
because when i install this library i manage and i upload the example ''GettingStartedProject''
I have already the Arduino Due therefore i want to use this board with the sensor

So something in PulseSensorPlayground, most likely.

I guess so but because I have searched and I have not found anything, do you know what i have to modify??

The senor signal is not being acquired by interrupt. Analog signal from the sensor comes into A0-pin of the ADC and then gets processed by software to show BPM on the Serial Monitor.

Most probbaly, you are right that the sketch is made for the standard Arduinos (UNO/NANO/MEGA) and NOT for DUE. The sketch does not get compiled in DUE Board.

Look into the following files for the source codes of the Library
PulseSensorPlayground.cpp (8.6 KB)
PulseSensorPlayground.h (15.8 KB)
Interrupts.h (15.3 KB)
if there is anything?