Basically I have an Arduino that enters 'Sleep' or low-power mode after a certain amount of time.I have a button set up to trigger an interrupt that wakes the Arduino out of power-save mode. It works pretty well but I would now like to have multiple buttons wake the Arduino.
So this would be pretty straight forward to do if I had a ton of interrupt pins but I only have 2 since I'm using an Uno. So it seems simple enough to just hook up the output of the buttons together and have a pin dedicated to waking the Arduino but I'm worried about overloading the pin if the user decided to press all the buttons at once.
So I'm curious; what you guys think the best way to get a setup like this working?
So something like this?
Any button press creates a low interrupt.
The switches are all isolated, if they were all connected to input pins, ,then you could scan the inputs after the interrupt to see which button caused it.
That schematic is exactly what I was thinking but would you need to set up the pin in code to do anything other than act as an interrupt and trigger on low?
Also, perhaps I am reading it incorrectly but would the pullup resistor be connected to the interrupt pin or to the other side of the button so that the 5v only flows when the button is depressed?
Yes you are, you need the resistor connected to 5V and the input, so when you push your button it connects the input to ground. In that way the input is never left to float. For more see:- http://www.thebox.myzen.co.uk/Tutorial/Inputs.html