Detecting falling rising edges

Hi,

I am using the ear clip heart rate sensor connected to the GrovePi+ on Raspberry Pi2.
When I use the digitalRead function in a polling loop, I do get a repetitive signal of 0 and 1 (at a rate that resembles the heart frequency) when I clip the sensor to the ear lobe. But is there a way to set interrupts and detect falling/rising edges, e.g. using the GPIO library?

Thanks,
Jorn