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

InkyFrame 5 cpp sleep does not seem to work properly #970

Open
r2p2 opened this issue Jul 12, 2024 · 0 comments
Open

InkyFrame 5 cpp sleep does not seem to work properly #970

r2p2 opened this issue Jul 12, 2024 · 0 comments

Comments

@r2p2
Copy link

r2p2 commented Jul 12, 2024

I try to run the following code

#include "inky_frame.hpp"

using namespace pimoroni;

InkyFrame inky_frame;

int main() {
  inky_frame.init();
  stdio_init_all();
  sleep_ms(500);

  inky_frame.led(InkyFrame::LED_ACTIVITY, 255);

  while (true) {
    inky_frame.set_pen(1);
    inky_frame.clear();
    inky_frame.update();
    inky_frame.led(InkyFrame::LED_ACTIVITY, 0);
    inky_frame.led(InkyFrame::LED_A, 255);
    inky_frame.sleep(1);
    inky_frame.led(InkyFrame::LED_B, 255);
  }
}

I observe the folowing behavior:
On usb power in order:

  • busy led on
  • screen goes flashy flashy until it stays white
  • busy led goes off
  • led A goes on
  • nothing happens anymore
  • expected behavior would be that LED B goes on and the loop should start again

When on battery:

  • busy led on
  • screen goes flashy flashy until it stays white
  • busy led goes of
  • led A goes on
  • led A goes off (since it enters deep sleep I guess)
  • 60 s later ... it wakes up as expected
  • busy led on
  • screen goes flashy flashy until it stays white
  • led A goes on
  • busy led goes of
  • nothing happens anymore
  • expected behavior, all leds go off and wakeup after 60 s like you did it already

I would therefore assume, that sleep does not work at all when usb powered, and the deep sleep when battery powered only works once and then shows the same behavior like when being usb powered.

Don't know what I do wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant