Deep sleep 'for a while'

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
Posts: 3
Joined: Sun Mar 18, 2018 8:29 pm

Deep sleep 'for a while'

Post by pvangeel » Thu Feb 07, 2019 7:03 am

Hi guys

I'm pretty unexperienced in the world of low-power programming.
I recently connected an e-ink display to my WiPy (using SPI), and I'm able to update it. According to the specs, I should send a 'sleep' command to the display after updating it to reduce power consumption. However I'm waiting for the 'busy' line of the SPI bus to go down before I can send the command, so my WiPy will be using a lot of power polling the line and sleeping.

Is there a way to 'deep sleep' for several seconds and then send the shutdown command to the screen and go t sleep for a longer time? As I can see, deep sleep brings you back to bootstrap, and there I can't pass any state as in 'sleep reason' or something like that.

Many thanks for your suggestions.


Post Reply