However my particular case (i need you to trust me on this) I need to have the interrupts attached to the buttons. A hardware solution is the only one I have. My program has some 13 different looping functions that I need to be able to switch between whenever a button is pressed.
On that INT pin. Nothing is ever pulling it low.Is that required? It's designated 'RISING' in the sketch, I think that takes care of it.
@Kuusou, yeah, like that, OVER the supply And important, on the actual layout they must be physically close to the chip.And like runaway_pancake also showed, no real need for R1, R3 and R5.And you are still drawing GND evil. Okay, a little less evil but still Just flip all the caps! Then the GND can be down and in line! Room enough to do so. And all switches can easily share the GND that way. Same for C1 to C3. I would even have used pins 1-2 on the switch to go to GND just to make it all look way better.
That's calling for a state machine, with buttons changing between the states. No interrupts needed, assuming you have done your programming properly. It sounds like debouncing is also not needed - if say button2 switches to loop2, bouncing doesn't matter as you're in loop2 already after the first contact is made. Debouncing is only needed when you have to count button presses.I may be missing something, but that's basically what you're telling here. So all you need is buttons - no caps, no resistors (use the internal pull-ups), no Schmitt trigger.So yeah, XY problem.