1 2 Previous Next 22 Replies Latest reply on Oct 22, 2015 2:46 PM by taha82

    Setting up a heart pulse sensor on a Galileo


      Hello there,


      I recently bought a heart pulse sensor for an Arduino Uno board. Here it is http://pulsesensor.myshopify.com/pages/code-and-guide


      It is great and works fine with the Arduino Uno board but I would really like to get it working with a Galileo board. I am a complete newbie to Arduino and I have an interest in setting up medical related sensors on the Galileo (more so than the Arduino board). But I'm finding that a lot of projects and tutorials based on Arduino boards are not very compatible with the Galileo - I am right? But I am going to persist with the Galileo.


      Anyway, there is a detailed walk through of the code for the pulse sensor available here http://pulsesensor.myshopify.com/pages/pulse-sensor-amped-arduino-v1dot1


      I believe the issue is related to a Timer2 timer. This is used to get a high enough resolution to get reliable measurement of the timing between each beat. About half way down the page, there is a piece of code that defines the setting for the Timer2.


      void interruptSetup(){ 
        TCCR2A = 0x02; 
        TCCR2B = 0x06;
        OCR2A = 0x7C; 
        TIMSK2 = 0x02; 


      Does the Galileo have Timer2 capabilities? Also, the Arduino and the Galileo have different clock speeds is this causing a problem.


      Would anybody be able to help me to modify this code so that that it is works on a Galileo? It would be much appreciated.

      Kind regards




      Side note:

      This is the error that I get when I run the code.lse



      'void interruptSetup()':
      Interrupt.ino:17:3: error: 'TCCR2A' was not declared in this scope
      Interrupt.ino:18:3: error: 'TCCR2B' was not declared in this scope
      Interrupt.ino:19:3: error: 'OCR2A' was not declared in this scope
      Interrupt.ino:20:3: error: 'TIMSK2' was not declared in this scope
      Interrupt.ino:21:7: error: 'sei' was not declared in this scope
      Interrupt.ino: At global scope:
      Interrupt.ino:27:4: error: expected constructor, destructor, or type conversion before '(' token
        1 2 Previous Next