about machine module

General discussion about topics related to OpenMV.
jisheng
Posts: 33
Joined: Wed Apr 12, 2017 9:42 pm

about machine module

Postby jisheng » Sun Nov 25, 2018 8:24 pm

hello, I am confused about one class, machine. i would like to use a external sensor to wake up the openmv from the sleep status.There is a constant, maching.PIN_WAKE. I dont know how to use it. And how shoule I connect the lines?Is there any example that can show how to use this command. Help,please. Thanks a lot.
User avatar
kwagyeman
Posts: 3339
Joined: Sun May 24, 2015 2:10 pm

Re: about machine module

Postby kwagyeman » Mon Nov 26, 2018 12:04 pm

Hi, please use the pyb class with an external interrupt.

Um, we have an example waking up using the internal RTC. As for external I/O pins... I'm not sure you can use them at a low power mode (< 1ma). All you can do is reset the system.
Nyamekye,
jisheng
Posts: 33
Joined: Wed Apr 12, 2017 9:42 pm

Re: kwagyeman

Postby jisheng » Mon Nov 26, 2018 8:54 pm

So is there anyway to realize the process that using a sensor to wake up and reset the openmv,then make openmv enter standby mode or suspend mode for some time that is not fixed? I just want the openmv to stop working and after being waked up by external sensor, the openmv can repeat the same function.
User avatar
kwagyeman
Posts: 3339
Joined: Sun May 24, 2015 2:10 pm

Re: about machine module

Postby kwagyeman » Tue Nov 27, 2018 12:18 am

Hi, yes, you can put the OpenMV Cam into standby by using the https://docs.micropython.org/en/latest/ ... yb.standby method. Then just toggle reset again to wake the camera back up and it will start executing whatever it was previously doing. We have some firmware revs with fixes to some things about to come out... really need to get some time to work on the IDE release.
Nyamekye,
jisheng
Posts: 33
Joined: Wed Apr 12, 2017 9:42 pm

Re: about machine module

Postby jisheng » Tue Nov 27, 2018 12:47 am

an external interrupt on X1 (PA0=WKUP) or X18 (PC13=TAMP1) Does the above sentense mean that i just need to give X1 or X18 a high level or low level? I cannot find this two lines on the openmvboard. Could you please give some hint? Thanks a lot.
User avatar
kwagyeman
Posts: 3339
Joined: Sun May 24, 2015 2:10 pm

Re: about machine module

Postby kwagyeman » Tue Nov 27, 2018 12:00 pm

Hi, we didn't break these pins out which is the reason why you have to use the reset line. Wakeup via those interrupts is not possible.
Nyamekye,
jisheng
Posts: 33
Joined: Wed Apr 12, 2017 9:42 pm

Re:kwagyeman

Postby jisheng » Sun Dec 02, 2018 8:37 pm

OK,I got it.Thanks a lot.

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 4 guests