Advanced Iris Tracking Software

As previously mentioned… OpenMV IDE uses the camera’s USB VCP port. If you want to talk to the camera when OpenMV IDE is connected please connect an FTDI chip to the OpenMV Cam’s hardware UART. Pins 4/5. Unfortunately, we have no solution for more than one USB VCP port to the PC. This is a limit of the USB hardware on the STM32 chip.

Would an Arduino work?

Sure, just turn it into a serial port pass through…

Awesome thank you

So I just write the code to receive and package data for Arduino and I should all work?

As determined by your skill…

I get the feeling your trying to work on something out of your depth here.

I can help. But, you’re going to really want to exercise your Googling muscle and try to do as much as you can before coming to the forums.

I will do that. However, thank you so much for your help. Yo have gotten me very far and your posts have taught me a lot. Thanks again for putting up with all of my posts and questions!

After a bit of work I have three questions for you. So, if you recall the code you sent me earlier for the UART iris tracking, do I need to add anything else to that if I want to send serial data to an Arduino. Secondly does the camera uses pins 4 and 5 for serial? Lastly, if the cam and Arduino are connected and my code is correct on both ends, this should work when I run the openMV’s IDE, right?

Thanks for your time and help

  1. Um, just write code for the Arduino.
  2. Yes, pins 4 and 5.
  3. OpenMV IDE connects using the USB port which is different from the hardware UART. So, you can run both at the same time.

Note, if you just want to get data off the OpenMV Cam and have that go to a program on your PC just use the “print()” command in your python script and any program that opens the serial port the OpenMV Cam is on will receive the print command output.

So even if I have a micro-USB cable attached to the computer, the other IDE could still read the print statement?

Only one program can read the serial port at a time. But, once you have the script working in OpenMV IDE… Save the script to the camera, reset the camera, and then open the serial port in another application.

I guess if you want a simpler answer, I simply want to take data off of the camera and onto visual studios.

Sorry I didn’t see your last post. So, I can write just a print statement and use the IDE terminal with the saved code and it will pickup on VS?

Yes.

Note: On opening the VCP port make the DTR line active. The MicroPython OS will not print data unless this is active.

Excuse my beginner questions but how to I work the DTS and RTS? I have a RTS function in visual studios but I’m not sure how it works in Micropython.


Thanks

*DTR

After opening the serial port make sure to set the line. I can give you a snippet of Qt C++ code for example. This is one line of code normally.

While I don’t need the code for Qt, how do I write the code in micropython?

Nothing has to be done on the cam for this. Just print data.

So no settings, no code? Just save and reset?