interrupts

Hey guys,

can someone help me with the attachinterrupt()? How do I specify which pin should trigger the interrupt?

I want to have a line detector on a digital pin trigger the interrupt. Is that possible?

Thanks

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

Specifies a function to call when external interrupt 0 or 1 occurs, on digital pin 2 or 3, respectively.

Interrupts detect a CHANGE, RISING, LOW, or FALLING voltage on pin 2 or 3. That should cover what you would need to do to detect the output from most devices.

You should read the rest of the reference, write a simple sketch, and experiment. :wink: