
Originally Posted by
ColdFire
The Teensy consumes 30 to 33 mA regardless if in sleep or not. What am I doing wrong here?
This is the code:
#include <Snooze.h>
SnoozeDigital digital;
SnoozeTimer timer;
SnoozeBlock config_teensy40(digital, timer);
void setup()
{
timer.setTimer(10);
}
void loop()
{
Snooze.sleep( config_teensy40 );
for (int i = 0; i < 4; i++)
{
digitalWrite(LED_BUILTIN, HIGH);
delay(500);
digitalWrite(LED_BUILTIN, LOW);
delay(500);
}
}
Firstly could you enclose any code posted between CODE tags using the # button as I have done below.
Code:
#include <Snooze.h>
SnoozeDigital digital;
SnoozeTimer timer;
SnoozeBlock config_teensy40(digital, timer);
void setup()
{
timer.setTimer(10);
}
void loop()
{
Snooze.sleep(config_teensy40);
for (int i = 0; i < 4; i++)
{
digitalWrite(LED_BUILTIN, HIGH);
delay(500);
digitalWrite(LED_BUILTIN, LOW);
delay(500);
}
}
As far as your code goes, I don't know if it makes any difference but you have specified a digital sleep component but not initialised it.
As I said I don't if it makes any difference but make some changes and give it a try.