Writing data to computer

I’m sorry if this question is dumb, but I’ve been surfing the forum for quite some time and couldn’t find an easy answer to this question.

I would like to use the camera to write edge detection to my computer directly. Which example code shows how to do this? I would like to avoid writing to the SD card in order to make the data acquisition from multiple parts of the experiment as easy as possible.

Hi, you’d need to use the USB VCP port to do this. But, that’s in use by the IDE for debugging. So, the best thing to do is attach an FTDI port to the camera’s UART3 and this will give you a serial port that’s not in use by the IDE.

Mmm, so, we can’t add another USB uart to the camera… But, I might be able to add a bypass port to OpenMV IDE to access serial data from the camera.

If you don’t use the IDE you can just directly talk to the USB vart using the USB VCP class under the pyb module.

Would having OpenMV IDE log serial data to a file be useful to you? I can add that very easily to the IDE. Or you can just copy the terminal text. The IDE will buffer 1 million lines of text.

As far as I know, this is the cheapest option for having a camera acquire very useful data. Writing serial data to a file would be very useful to me and I’m guessing to others. I’m interested in hearing about all possible solutions and what you would recommend as the easiest way to use up to 3 openMV cameras to write or send data. Ideally having all three write to a single computer but it’s okay if each camera needs a separate computer.

Adding this feature to the IDE is basically the easiest way. For now, the best thing to do is to add an FTDI chip to the UART3 port to send serial data back to the PC. Then you need to write a program on the PC to log that serial data.

For letting the IDE do this for you, what would you like exactly? A stupid simple way is just to log the serial console text always and then there would just be a file you go to for getting access to that. I can do this for the Open terminal feature so you could connect multiple cameras and log data from each of them.

The question would then be… Where to put these files? And how big should they be allowed to grow? I guess this could all be under an option panel.

Just to make sure I understand, I need to add an FTDI chip to the UART3 port AND you will add something to the IDE to write the data to a file?

I will add something to the IDE for the next release of it. That said, doing releases takes a long time. So, in the mean time just send data to the PC via the hardware UART on the OpenMV Cam. This way you can use the camera with OpenMV IDE still. You’ll have to do your own program to log data from the OpenMV Cam’s UART.

Okay, thanks for the quick response!