Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAMD21 wrong sleep time with Seeedstudio XIAO #57

Open
i-g-g-y opened this issue Mar 9, 2023 · 0 comments
Open

SAMD21 wrong sleep time with Seeedstudio XIAO #57

i-g-g-y opened this issue Mar 9, 2023 · 0 comments
Labels
type: imperfection Perceived defect in any part of project

Comments

@i-g-g-y
Copy link

i-g-g-y commented Mar 9, 2023

Hello.

I am seeing issues with wrong sleep time length on Seeedstudio SAMD21 board.

This code sleeps for 1.7 seconds, but should sleep for 1s:

#include "ArduinoLowPower.h"

#define DONE_PIN 1
#define LED_PIN LED_BUILTIN

void setup() {}

void loop() {
    digitalWrite(LED_PIN, HIGH);
    LowPower.deepSleep(1000);
    digitalWrite(LED_PIN, LOW);
 
    signalDONE(100);
    delay(10);
    signalDONE(200);
}

void signalDONE(uint8_t timeout) {
  pinMode(DONE_PIN, OUTPUT);
  digitalWrite(DONE_PIN, HIGH);
  delay(timeout);
  digitalWrite(DONE_PIN, LOW);
}

image

@per1234 per1234 added the type: imperfection Perceived defect in any part of project label Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants