0

best Trinket M0 low power library?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: best Trinket M0 low power library?

by kenf3 on Sun Nov 08, 2020 12:13 pm

I've noticed my Trinket M0 stops working after approx 30 days. Could the cause be the LowPower.deepSleep(3600000) from the ArduinoLowPower library? Is there an overflow situation that is occurring?

My code is very simple ...

Code: Select all | TOGGLE FULL SIZE
#include <ArduinoLowPower.h>
#include <Adafruit_DotStar.h>

#define NUMPIXELS 1 // Number of LEDs in strip

// Here's how to control the LEDs from any two pins:
#define DATAPIN   7
#define CLOCKPIN   8

Adafruit_DotStar strip = Adafruit_DotStar(
  NUMPIXELS, DATAPIN, CLOCKPIN, DOTSTAR_BGR);

// the setup function runs once when you press reset or power the board
void setup() {
 
  pinMode(0, OUTPUT); // LED
  pinMode(1, OUTPUT); // LED
  pinMode(2, OUTPUT); // LED
 
  strip.show();  // Turn all LEDs off ASAP
 
}

// the loop function runs over and over again forever

void loop() {

  for (int i=1; i<=5; i++) {

    digitalWrite(0, LOW);
    digitalWrite(1, LOW);
    digitalWrite(2, LOW);
    delay(1000);
 
    digitalWrite(0, HIGH);
    digitalWrite(1, HIGH);
    digitalWrite(2, HIGH);
    delay(1000);
  }

  LowPower.deepSleep(3590000);
 
}

kenf3
 
Posts: 11
Joined: Sun Jan 08, 2017 3:53 pm

Re: best Trinket M0 low power library?

by rafikii on Tue Sep 21, 2021 9:38 pm

what was the current reading?

rafikii
 
Posts: 58
Joined: Sat Jan 30, 2021 1:18 pm

Please be positive and constructive with your questions and comments.