Go Down

Topic: The Grove - Ear-clip Heart Rate Sensor cannot work with YUN (Read 771 times) previous topic - next topic

YZDYZD

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


sonnyyu

Code: [Select]
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)


https://www.arduino.cc/en/Reference/AttachInterrupt

Change code from

Code: [Select]
void setup()
{
 ...
 attachInterrupt(0, interrupt, RISING);//set interrupt 0,digital port 2
}


To

Code: [Select]
void setup()
{
 ...
 attachInterrupt(0, interrupt, RISING);//set interrupt 0,digital port 3
}



Set interrupt 0, digital port 3 at Yun.







Go Up