In case of attachInterrupt(A0, ISRoutine, CHANGE) is there a way to know if it is a FALLING or RISING interrupt?

In case of attachInterrupt(A0, ISRoutine, CHANGE) is there a way to know if it is a FALLING or RISING interrupt?

Edit:
Can I pass an argument to an Interrupt service routine used in Core Firmware??

Hi @bijay

You just need to digitalRead the pin and if it is HIGH in the interrupt service routine, you had a rising edge event. LOW means falling edge event.

4 Likes

Further to your edit–from the doc:

function: the function to call when the interrupt occurs;
this function must take no parameters and return nothing. This function
is sometimes referred to as an interrupt service routine (ISR).

2 Likes

Why didn’t I think of this. Thanks for your quick reply.

1 Like