Working sensor code with pulse measurement
