Great project! Let me give you some information, as you have mentioned some projects are not fully compatible with the Galileo the reason is they use instructions designed for other processors than the Quark, as example
TCCR2A, TCCR2B, OCR2A and TIMSK2 are macros designed for the Atmega as mentioned in the this walkthrough http://pulsesensor.myshopify.com/pages/pulse-sensor-amped-arduino-v1dot1 , you will have to search a workaround perhaps creating a function to obtain the same result , also we need to do the same for the interrupSetup() at this time this is not validated for the Galileo, see post https://communities.intel.com/message/218968.
If you are still in need of a galileo compatible code for pulse sensor, I have written some for both Arduino IDE and using the IoT Dev Kit
You can download and try
gowrisomanath No. I have to try your code, may be tonight.
All this is new to me as I'm from web application development background. so the interruptSetup in Arduino code sample on pulsesensor.com was confusing me and just in the phase of learning it.
I tried out your sample for heart rate sensor. I get this error while compiling,
In file included from /Users/******/Documents/Arduino/libraries/gsPulseHeartRate/gsPulseHeartRate.h:12:0,
/Users/*****/Documents/Arduino/libraries/gsPulseHeartRate/mraa/aio.hpp: In constructor 'mraa::Aio::Aio(unsigned int)':
/Users/******/Documents/Arduino/libraries/gsPulseHeartRate/mraa/aio.hpp:50:94: error: exception handling disabled, use -fexceptions to enable
throw std::invalid_argument("Invalid AIO pin specified - do you have an ADC?");
Any idea, what am I doing wrong here?
Also a request, please elaborate the readme.md file on Git, it will be very helpful for the first time users like me.
The error is saying "("Invalid AIO pin specified - do you have an ADC?");"
So that means your analog pin number is incorrect.
I was working on The Galileo arduino board. It should also work with Edison arduino board.
What board are you using? I dont think it will work directly for the breakout board.
Also this code is for the Eclipse C++ IDE with IoT Dev kit. NOT for Arduino IDE.
For the Arduino IDE you need to use gowrisomanath/gsArduinoPulseHeartRate · GitHub
I got the error while verifying the code in the IDE itself. For sure I will try the code you share for Arduino IDE and will update you.
Thanks a lot for your time gowrisomanath, I'm sure over conversations will be useful for someone visiting this thread.
Hey Gowri, I had no luck in making your code on Edison. I tried the code here [gowrisomanath/gsArduinoPulseHeartRate · GitHub] with no luck yet. Initially I got an error PULSE_CHECK_TIME_GAP is not defined and I got that cleared. But now, there is no errors and there is no output. I get nothing when I call the function getPulseRate() to the serial monitor just to view the output from the sensor. Could you please help me out? Am I missing any configurations or something?