Pulse Sensor code