This is the code from the article on
pulse measurement using the LAB-X3.
Note that for it to work you need to
modify your LAB-X3 to allow the input capture
pin to be used. This may break other software that runs on the LAB-X3 and
expects the LCD to be connected to that pin.