Hi there,
As i’m newbie to openmv, I wanna know how to capture an image when an external trigger is given via gpio pin. I wanna capture an image when a buzor is pressed and find the qrcodes in that image and share those data via uart to a pc. I’m using openmv m7. Thanks in advance.
CODE:
import sensor, image, time
from pyb import *
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)
clock = time.clock()
i=0
def callback():
i=1
ext = ExtInt(Pin('P7'), ExtInt.IRQ_RISING, Pin.PULL_DOWN, callback)
if(i==1):
print('trigerred')
img=sensor.snapshot()
else:
print('no signal')
this code doesn’t works actually.