Page 1 of 1

Programatically transferring data off board to a host.

Posted: Wed Oct 17, 2018 6:53 am
by bogflap
There seems to be little enthusiasm to write any kind of host programs that enable the transfer of data to a host using programming only.
In my use of the M7 and I have constantly hit problems with memory usage which I feel sure cannot be unique.
I would like to be able to transfer data from the M7 to an environment such as QT on a laptop where memory issues will not arise.
Is there anyone out there who has managed to transfer data off the M7 and are they willing to share code?

Re: Programatically transferring data off board to a host.

Posted: Wed Oct 17, 2018 1:40 pm
by iabdalkader
Hi, actually we have a Python module you can import in your scripts and use the cam just like the IDE would:

https://github.com/openmv/openmv/blob/m ... yopenmv.py

And this is an example that executes a script, grabs the framebuffer and displays it using pygame:

https://github.com/openmv/openmv/blob/m ... enmv_fb.py

Re: Programatically transferring data off board to a host.

Posted: Wed Oct 17, 2018 1:48 pm
by bogflap
Yes got it.
I am looking at __USBDBG_TX_BUF command.
Does this receive the results of using the functions USB_VCP.write(buf) or USB_VCP.send(data,timeout). Besides the timeout is there any difference in these functions?
Also what type does buf or data have to be. I would like to send the results of read_ir from an MLX90640 device

Re: Programatically transferring data off board to a host.

Posted: Wed Oct 17, 2018 2:34 pm
by iabdalkader
bogflap wrote:
Wed Oct 17, 2018 1:48 pm
I am looking at __USBDBG_TX_BUF command.
Does this receive the results of using the functions USB_VCP.write(buf) or USB_VCP.send(data,timeout).
No, this module implements the camera debugging protocol it lets you control the camera programmatically, instead of using the IDE, to do low-level stuff like read the framebuffer, upload/exec/stop scripts, get firmware version, chip ID etc.. Note the USB_VCP.send/write can Not be used with this module. If you just want to send data from a script use USB_VCP.send and read the data from the serial port.

Note: write is non-blocking.