Library for pulse sensor using hardware timer