digitalPinToInterrupt(6)
returns 6? My earlier suggestion therefore meant that omitting digitalPinToInterrupt
would have been equivalent, however it doesn't actually solve your problem. I can't see anything wrong, except that maybe attachInterrupt
is not working as intended.