Programatically transferring data off board to a host.

OpenMV related project discussion.
bogflap
Posts: 35
Joined: Mon Apr 16, 2018 10:03 am

Programatically transferring data off board to a host.

Postby bogflap » Wed Oct 17, 2018 6:53 am

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?
User avatar
iabdalkader
Posts: 595
Joined: Sun May 24, 2015 3:53 pm

Re: Programatically transferring data off board to a host.

Postby iabdalkader » Wed Oct 17, 2018 1:40 pm

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
bogflap
Posts: 35
Joined: Mon Apr 16, 2018 10:03 am

Re: Programatically transferring data off board to a host.

Postby bogflap » Wed Oct 17, 2018 1:48 pm

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
User avatar
iabdalkader
Posts: 595
Joined: Sun May 24, 2015 3:53 pm

Re: Programatically transferring data off board to a host.

Postby iabdalkader » Wed Oct 17, 2018 2:34 pm

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.

Return to “Project Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests