is there a function triggered by certain input voltage change?

The ATmega328P has two external interrupt inputs on pins 2 and 3. You assign a function to them with the attachInterrupt() function.

http://arduino.cc/en/Reference/AttachInterrupt