The Grove - Ear-clip Heart Rate Sensor cannot work with YUN

I only can see the “Heart rate test begin”

After I touch the one of the pins (D2,D3,D5 AND SCL)at the back of yun board, the TX led light up, and the serial monitor shows that the heart rate is very large and the number roll very fast and “Heart rate measure error,test will restart!” in the end

heartrate_new.ino (1.92 KB)

Board	int.0	int.1	int.2	int.3	int.4	int.5
Uno, Ethernet	2	3	 	 	 	 
Mega2560	2	3	21	20	19	18
32u4 based (e.g Leonardo, Micro, Yun)	3	2	0	1	7	 
Due, Zero	(see below)

Change code from

void setup()
{
 ...
 attachInterrupt(0, interrupt, RISING);//set interrupt 0,digital port 2
}

To

void setup()
{
 ...
 attachInterrupt(0, interrupt, RISING);//set interrupt 0,digital port 3
}

Set interrupt 0, digital port 3 at Yun.