I'm trying to use an existing button panel. The buttons are connected to 3.3V in series with different resistors. Now, when I connect this to an analog input I can use analogRead() and see different values for the different buttons. Like expected.
The problem is that I also need interrupts. But when using interrupts on a pin, and then using analogRead() after an interrupt happend, everything stops working.
I assume this is because analogRead() messes with the pins.
I cannot tell you why "everything" stops working. But have you considered, if the resistor of the buttons are in a way that you will get a logic "high" with every button? Otherwise the interrupt won't work (or: you would need an extra circuit to trigger the interrupt)
Also consider connecting the button output to 2 arduino inputs in parallel - analog and digital in. Then you won't have to switch the pin mode in operation.