In OPENMV2 board, try to utilize the mpy thread functionality. Upset, the function is not working fine. three thread are scheduled by around 10s interval. Code as below:
By comparing with pyboard, after enable the _thread module in mpconfiguration.h, the _thread func working well. thread are scheduling as multi-thread working.
in mpconfiguration.h for pyboard
It works in Micropyhton because they don’t use this patch, we use this patch because this bug affects the IDE (causes the camera to crash when the script is started/stopped). There’s No plan to support threading before this issue is fixed in Micropython first.
would you help to highlight the patch. in my work, multithread support is more important than OPENMV IDE works. so I tend to remove that patch temporarily.
Thanks iabdalkader, but after remove this patch, multithread in OPENMV board is still not working fine. is that so, before this patch, openmv can support multthread before? or anything else I missed
Is there any update on this? We would like to run two wifi sockets, one providing only images and another accepting commands to run some connected hardware. We can do that on one socket now by requesting images via a command on that channel between the other channels, but…
There are two different programs that we need to support on the PC side:
One program only understands getting a constant stream of image data. We can’t change that program.
Our program can send commands and recognize different responses.
We would like to run an thread that only sends images on one port, and have the main thread process commands.
Is there an update on this? I have a similar use case as @JamesNewton and would really appreciate it if there’s anything at least experimental with threading. Thanks!