Hi,
ref Arduino Playground - ArduinoSleepCode
I can't get the sleep code tutorial to work using 1.0. Works fine on V23, anybody any idea how to get the sleep mode to work, apart from using V23?
Any help appreciated.
Hi,
ref Arduino Playground - ArduinoSleepCode
I can't get the sleep code tutorial to work using 1.0. Works fine on V23, anybody any idea how to get the sleep mode to work, apart from using V23?
Any help appreciated.
Can't remember where I found this, but works for me with V1.0 on a Duemilanove.
#include <avr/sleep.h> // powerdown library
.
.
.
//***************************************************
// * Name: enterSleep
/* the sleep modes
SLEEP_MODE_IDLE - the least power savings
SLEEP_MODE_ADC
SLEEP_MODE_PWR_SAVE
SLEEP_MODE_STANDBY
SLEEP_MODE_PWR_DOWN - the most power savings
*/
void enterSleep()
{
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
cli();
sleep_enable();
sei();
sleep_cpu();
sleep_disable();
}
Pete
Scratch that. Finger trouble my end. Had a dodgy pos volts on Pin2 not holding the interrupt off.
Thanks.