Turning on the camera instantly from sleep mode

Greetings, I was wondering if it was possible for the camera to be turned on immedietly from sleep mode from the library without specifying a given repeated time. To put you in perspective, I am working on a project where rover drone must be launched from a rocket and when it lands safely, the camera must be turned on and start taking phothos.

Thanks in advance.

Yes, it’s possible, you need to record all relevant registers on the camera and reload them on turn on. I don’t know exactly what register settings you need to modify however.

You can also use extint to wake up from sleep mode:

import time, pyb, machine
from pyb import Pin, ExtInt

def callback(line):

led = pyb.LED(3)
pin = Pin("P5", Pin.IN, Pin.PULL_UP)
ext = ExtInt(pin, ExtInt.IRQ_FALLING, Pin.PULL_UP, callback)

# Enter Stop Mode. Note the IDE will disconnect.

while (True):