I'm working on a project that I've been pondering for almost a year, and I have been prototyping it with my Arduino Mega 2560 (my Arduino mini died, so the 2560 is all I have at the moment) for the past two weeks, but I've hit a snag.
Here's a little breakdown: I have four buttons I want on the final product. I have each button defined as pins in my script.
I want the ATMEGA to power down when I press one of these buttons, or after a set amount of time being idle. Then, I want to be able to press any one of my buttons to power it back on again.
Since my final product is going to use an ATMEGA328 instead of a 2560, that means I can really only use one of the two interrupts (right?) to wake the chip. It also simplifies my software quite a bit if I can use one pin to power the buttons and detect that a button was pressed, and the other pins to detect which button was pressed. So I've set up my buttons so that the wake pin is pulled high, and the button pins are pulled low, and when I press a button, theoretically, the wake pin goes low and the button pin goes high. Doesn't happen. The wake pin does go low, but the button pin doesn't go high, and I can't figure out why. Even if I remove the pull-down resistor, it doesn't work.
Does anyone have any ideas?