Skip to content

patriciogonzalezvivo/ofxPulseSensor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pulse

OpenFramework addon to read that from PulseSensor develop by Joel Murphy and Yury Gitman.

This addon helps you get the heartbeat (BPM and IBI) and use it in your openFrameworks project using the GPIO's of your RaspberryPi or by using an Arduino to send the signal by Serial connection.

<iframe src="http://player.vimeo.com/video/77236762" width="575" height="359" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>

Installing

Clone this addon repository into your openFrameworks/addons folder:

cd openFrameworks/addons
git clone https://github.com/patriciogonzalezvivo/ofxPulseSensor

Setting Up

On you computer through an Arduino Using Arduino as Server and your laptop (tested on OSX) as a client:

  1. Flash your Arduino with this firmware
  2. Connect the Arduino by USB to this computer and the PulseSensor to the arduino following this guide or this video
  3. Add this addon to your program (see arduino-example) and compile

In the RaspberryPi through the GPIOs:

photo

  1. RaspberryPi don't have analog-in like Arduino. That's why we are going to use MCP3008 to transform the resistance of the photocell into pulse frequency. Maybe you also want to by the Pi Cobbler breakout to make the connections easier.

  2. Everything is almost like this tutorial except that we are not using #23, #24 and #25 instead we are using SPI just like Jason Van Cleave and Andreas Muller did in this example. Off course instead of using a potentiometer the PulseSensor.

  3. Configure your RaspberryPi for wiringPi ( https://github.com/openFrameworks-RaspberryPi/openFrameworks/wiki/Raspberry-Pi-Using-the-GPIO-pins-with-Wiring-Pi-and-openFrameworks ).

    sudo nano /etc/modprobe.d/raspi-blacklist.conf

Comment with # (or remove) those lines

sudo reboot
  1. Add ofxPulseSensor to your addons.make file, compile and run as root. (Attention! Because the wiringPi the App need to be run in super user mode or sudo )

    make sudo make run

More References about Analog Inputs in RaspberryPi:

01 02 03

About

openFrameworks addon of PulseSensor ( for Arduino and RaspberryPi )

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published