AD8232 Heart Rate Monitor Hookup Guide

Contributors: CaseyTheRobot
Favorited Favorite 9

Uploading the Sketch and Connecting with Processing

By this point, you should have the hardware connected and ready.

The example sketch can be found on github here. You can cut and paste the code straight from github or clone the repository and open the file. For more on using the SparkFun Github repositories, read this handy tutorial. If you’ve never worked with the Arduino IDE before, please see this tutorial.

alt text

Upload sketch to Arduino Pro-Mini

Now that you have a sketch running, let’s get the processing sketch ready. The processing sketch will give you a visual output of what’s going on. The example processing sketch can be found here. The example Processing sketch works with the Processing IDE v2.2.1. Later versions may not work with the example code so makes sure to download the stable release for v2.2.1 from the Processing IDE Download page.

alt text

Run the Processing sketch

If the processing sketch does not work, you may need to modify the following line:

myPort = new Serial(this, Serial.list()[2], 9600);

You may need to change the parameter inside Serial.list()[N]. A List of available COM ports will appear in the lower portion of the sketch window. Remember that COM port selection begins at 0. Typically your Arduino will appear as the highest COM number if it is the only device connected to your computer.

alt text

The Arduino shows up as COM38. This is found in the Serial List at array element “2”.

If everything is working correctly, you should see a nice box pop up and start displaying the output signal.

alt text

“Normal” heart rate of an SFE engineer

If your subject decides to remove the sensors, the leads off detection will kick in and display a flat blue line.

alt text

“Flight, we just lost Lovell!”