best Trinket M0 low power library?

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
kenf3
 
Posts: 11
Joined: Sun Jan 08, 2017 3:53 pm

Re: best Trinket M0 low power library?

Post by kenf3 »

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

#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);
  
}

User avatar
rafikii
 
Posts: 69
Joined: Sat Jan 30, 2021 1:18 pm

Re: best Trinket M0 low power library?

Post by rafikii »

what was the current reading?

Locked
Please be positive and constructive with your questions and comments.

Return to “Trinket ATTiny, Trinket M0”