MySensors Library & Examples  2.3.2
event.c

Shows how to use event detection on an input pin