Hi, I would like my Inky Frame running on battery power to wake up every hour to run my main.py script. I am using MicroPython v1.21.0, inky_frame v1.21.0 on 2023-10-06; Raspberry Pi Pico W with RP2040.
- When on USB power: the function inky_frame.sleep_for(60) wakes up the Inky Frame correctly every hour and refreshes the screen.
- When on Battery power: the function inky_frame.sleep_for(60) wakes up the Inky Frame correctly after one hour, starts the main.py, but when doing graphics.update(), it doesnāt refresh the screen and the power LED stays on indefinitely.
I have also tried with rtc.set_timer() and rtc.set_alarm(), but I donāt find a lot of documentation to use these functions.
Here is my basic script that runs correctly on USB, but not on battery using inky_frame.sleep_for():
from picographics import PicoGraphics, DISPLAY_INKY_FRAME_7 as DISPLAY
graphics = PicoGraphics(DISPLAY)
import inky_helper as ih
import gc
gc.collect()
# A short delay to give USB chance to initialise
time.sleep(0.5)
while True:
graphics.set_pen(ih.inky_frame.WHITE)
graphics.clear()
graphics.set_pen(ih.inky_frame.BLACK)
graphics.set_font('bitmap6')
graphics.text("Hello Inky", 0, 0, 600, 4)
graphics.update()
ih.inky_frame.sleep_for(1)