Code for the Pulse Sensor for Arduino and iOS