Pulse Sensor with Processing

In this project, you will learn how to visualize heart rate data using Processing!


This project assumes you have completed the Getting Started Kit tutorial using Processing.


Make sure you have all the parts before moving on.

Note: the pulse sensor shown below can be purchased from pulsesensor.com.

Pulse Sensor

Phidget cable

Pulse Sensor Connection

The pulse sensor outputs a voltage that provides information about your heart rate. The VINT Hub Phidget is capable of reading voltages between 0 and 5V.

Connect your pulse rate sensor directly to hub port 0.

There are three wires on the pulse sensor, just like there are three wires on your Phidget cable.

Connect your wires as shown.

  • Black to Black
  • Red to Red
  • Purple to White

Your pulse sensor should now be connected directly to port 0 on your VINT Hub Phidget.

Note: for a more permanent connection, consider soldering the wires together.

Write code (Java)

This project is written using Processing. Code is available via GitHub.

If you have used GitHub before, you can clone the directory. If you are new to GitHub, you can simply click on the green Code button, and download the code as a zipped file.

Open PulseSensorAmpd_Processing_Visualizer.

Note: You will need to add the Phidget libraries to this project. If you need a reminder of how to do this, revisit the Getting Started Kit Course.

Run The Program

Connect the pulse sensor to you finger or ear, and run the program. You can use the slider at the bottom of the window to zoom in on the signal!

Calculating BPM

Stay tuned for part two of this project where a BPM calculation is added.

What are Phidgets?

Phidgets are programmable USB sensors. Simply plug in your sensor, write code in your favorite language and go!

Phidgets have been used by STEM professionals for over 20 years and are now available to students.

Learn more

Set your preferences


Mac OS

Raspberry Pi











Visual Studio


Setting your preferred operating system, programming language and environment lets us display relevant code samples for the Getting Started Tutorial, Device Tutorials and Projects