Hi, hoping you kind guys give some advice to my question about the serial port use with openMV, here is the confusing thing:
I implemented the SUB_VCP example and then integrated into my code in OpenMV4, sending some data and images to PC Linux, everything is fine, the connection is done and data is exchanged correctly. But something strange happens, when I use the serial port lib in Cpp in linux, the data extrange speed is low, like 0.5Hz when receiving image; when using serial port in python to receive data, the speed can be up to 10Hz.
- settings of baudrate are the same in both cpp and python.
- the codes in openmv are the same in both tests
- the data is extranged correctly in both tests
problem is: the receiving speed of serial port in cpp seems match the baudrate setting, while the data speed of python implementation seems much higher the baudrate setting. in Python, it seems speed can reach 1MB/s
Please share some guides to me to figure out the following questions, great thanks:
- why is that happens?
- how can I speed up in cpp implementation?(like speed in python implementation)
eager to hear your advice, thanks.