Go Down

Topic: Waking Mega Up From Sleep (Read 195 times) previous topic - next topic

lee501

Hi, I have been using the sleep routine examples, shown on the Arduino main site (http://playground.arduino.cc/Learning/ArduinoSleepCode) with Uno and had no problems putting the little chap to sleep and waking him up. However, I've recently ported the same code to the Mega 2560 and found that it goes to sleep okay but it won't wake up on an external interrupt, as the Uno used to do before. I've tried using different interrupts on the Mega, and rearranging the order of the attachInterrupt() and other functions within the sleepNow() function, to see if this helps, without success. The interrupt which I am using to wake mega up works fine during normal operation ( as do the other interrupts on the board) its just that when the unit goes to sleep, it is completely unresponsive after that.

Has any one else found problems with putting Mega to sleep or waking it up with the example code? Any ideas why this might not be working? Any help or suggestions will be gratefully received, many thanks. :~

Go Up