You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, is there a reason why the library does not support the non-P version of ATmega328?
With board selected as "ATmega328", sketches will not compile. To overcome this, I amended line 112 of LowPower.h as follows: #if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega328__) || defined (__AVR_ATmega168__)
The sketch below now compiles and uploads fine.
// **** INCLUDES *****
#include "LowPower.h"
void setup()
{
Serial.begin(115200);
}
void loop()
{
Serial.println("Sleeping...");
Serial.flush();
// Enter power down state for 4 s with ADC and BOD module disabled
LowPower.powerDown(SLEEP_4S, ADC_OFF, BOD_OFF);
Serial.println("Woke up...");
Serial.flush();
delay(4000);
}
I measure the current consumption during the sleeping periods at around 20-25uA vs. around 3.6mA when awake (8MHz internal clock, 3.3V). Not as low as a 328P, but not too bad at all!
The text was updated successfully, but these errors were encountered:
Hi, is there a reason why the library does not support the non-P version of ATmega328?
With board selected as "ATmega328", sketches will not compile. To overcome this, I amended line 112 of LowPower.h as follows:
#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega328__) || defined (__AVR_ATmega168__)
The sketch below now compiles and uploads fine.
I measure the current consumption during the sleeping periods at around 20-25uA vs. around 3.6mA when awake (8MHz internal clock, 3.3V). Not as low as a 328P, but not too bad at all!
The text was updated successfully, but these errors were encountered: