Check out "Heart Rate". You cover the rear camera lens with your finger and then it measures your pulse by turning on the flash LED and monitoring the light that gets in through your finger. As the blood pulses in your finger, the light transmission goes up and down. The program graphs that and tells you your HR. I use it to measure resting HR in the morning. Works well, and it's free!
This is the principle of a "pulse hypoximeter" and now you can have one for free on the iPhone. Only works on iPhone 4 I think.