Hi,
i want the user to set an interrupt (0-7).
What i need is to get the Pinnumber from this OR the actual Port, so i can read the values.
I also need to access the EIFR Register for the Flags. Problem with this is, that on Micro they use int 4 to attach the interrupt, but in fact it is int 6. (there are no 4-5, idk why)
Is there an easy way of getting these values, or will this be more complicated? because then i will just input both values from the user. int and pin number.
As you are asking this question I think it is reasonable to suggest that a simpler system that doesn't need interrupts would better match your present experience. Interrupts can be very difficult to debug.
The simplest solution is to read the values of all the pins with digitalRead() and then do stuff depending on the pin values.
I know what i am doing. I built an IR reading sketch, which is way more relyable than kens and takes 6kb less. Just declaring the input interrupt is a bit messy, because i have to submit 3 values. Pin, Arduino Interrupt, Intern interrupt