I am basically trying to have a triggered snapshot.
For this, I use et ExtInt set up on a rising edge of an IO (feed by my Arduino), then inside my callback func, I take a snapshot.
In other words:
Code: Select all
def callback(line): global img img = sensor.snapshot() extint = pyb.ExtInt(Pin('P1'), pyb.ExtInt.IRQ_RISING, pyb.Pin.PULL_NONE, callback)
I wonder why the snapshot call do allocate any memory, and if there is a workaround to make this work.