RPC library import error when using RT1062 CAM

When using the RT1062 board. OpenMV IDE throw an error when I add the RPC library. Similar code use to work fine for the OpenMV M7 board. Not sure if related, but I use the same environment to develop for the OpenMV M7 board
image

Serial Terminal:

Traceback (most recent call last):
File “”, line 11, in
File “rpc.py”, line 10, in
ImportError: no module named ‘pyb’
OpenMV v4.5.1; MicroPython v1.20-omv-r17; OpenMV IMXRT1060-MIMXRT1062DVJ6A
Type “help()” for more information.

The RPC library depends on PYB so it cannot work on the RT1060 at this moment. Also, the machine module doesn’t support slave mode for SPI or I2C currently.

I can make UART more work pretty easily if you can get by with that for the machine module. Can you use that? If so, I’ll spend some time on the code to make the UART master/slave work.

Anything that needs pyb is not going to be working. So, until we get everything moved over to the machine module there’s going to be some inconvenience.

That would be a big help for me as well. I am trying to remotely call a tracking script on the RT1060 via a sparkfun ESP32 and transmit the x/y position of the marker (first choice of interface was SPI).

@leonW Will UART mode work for you?

Yes. UART should work. Thanks

Okay, will try to get on this soon. I have to finish the website update first.

UART should work for me too. Thanks!

scripts/libraries: Change the RPC Interface Library UART Master. by kwagyeman · Pull Request #2056 · openmv/openmv (github.com)

Hello, I have a python interface on Windows 10 to setup my OPenMV H7 via VCP_UART, now i used RT1062, how write the Virtual USB port on USB ? (when i use UART, no message over the Virtual USB port, i thing is send on hardware UART)

It’s not possible right now because micropython doesn’t yet support the VCP module for the machine class.

In fact, MicroPython is currently working on building out this new USB interface: micropython-lib/micropython/usb at master · micropython/micropython-lib (github.com)

I’m not exactly sure what the state of it is. But, on the next MicroPython release we can support this and re-target the RPC library to use it.

Ok thank you for your answer. I will try to modifiy my interface to work over the bleutooth like a serial port.

Hello!
I have error message “no module named ‘pyb’” at line
“interface = rpc.rpc_usb_vcp_slave()” with RT1062 cam.
I need to stream images to laptop to program which I have made 4 years ago for OpenMV H7.
Laptop with windows is connected through USB. Is there any solution?
Sincerely Azer Babaev

Please use the openmv/tools/pyopenmv.py at master · openmv/openmv and openmv/tools/pyopenmv_fb.py at master · openmv/openmv to send scripts to the the board and pull info from them

You can also use the micropython/tools/pyboard.py at 5adf65b0298ef6f1cc3300e78bb4197b021a5e25 · openmv/micropython script to remote control the board.

The RPC library VCP mode will be removed as the machine module, which is cross-platform, has no support for this.

This seems to be interesting instrument. Do you have any idea how to change variable values remotely (for example thresholds for color filter) during script streaming in endless cycle?

Right now there’s no way to do that without starting and stopping the system. You can send a new script.

If you use the pyboard.py script that has full REPL access, it will allow you to control the system dynamically.

Pyboard can do required things in REPL, but hasn’t instruments to grab frame buffer. I tried to launch pyboard and pyopenmv simultaneously, but they stand in conflict to each other for COM port.

You can create your own protocol to transmit the frame buffer using pyboard.py. You just need to transfer a jpeg compressed byte array.

But, yes, the debug protocol has been missing support to send data to the camera for a while. However, adding this is not on the top list of priorities at the moment.