Connecting Terminal over Serial

Hello,

I want to control OpenMV over Bluetooth using Hc-05/06 type device.
But first I test with a std FTD serial to USB in order to make it work, but I cannot connect on the OpenMV using the IDE Tool/Terminal.
Am I missing something here ?

Make a script called main.py with with this code:

import pyb
pyb.repl_uart(pyb.UART(3, 115200))
while(true): pyb.wfi()

Assuming it runs right you should be able to get the REPL terminal working on UART 3. I haven’t tested this however.

Anyway, if the above works then you can use the Open Terminal feature to connect to whatever serial port is connected to UART 3. You can then load scripts via the Open Terminal window.

To send the frame buffer so:

print(img.compress_for_ide(), end=’’)

This will jpeg compress an image in place and then format it for transmission over a serial link to be sent to OpenMV IDE.

Note that at 115200 you can’t really send images quickly… So, I wouldn’t try to send images, but, you can.

Once I have time to work on this I’ll get the above repl_uart working on the wifi board. Then the real magic will start.

Note that the main connect button is only for USB connections. The debug protocol we use versus how REPL works are very different so I just went with multiple ways for controlling the system.

Ok then the Open Terminal cannot be used as a ‘‘remote’’ IDE?

Here’s my use case:
On my Tracker system, I want to remotely change the LAB filter values on the saved script and restart it.
Can this be done ?
Or would you think of any method to change values on a running script ?

Um, the REPL prompt doesn’t save scripts. But, you can write the code to do this. Just make a simple serial monitor that reads bytes from the serial port until it gets a new line. Then parse that text using python to extract six numbers, write that to a text file, and keep running the script. On boot load the settings from the said text file. You have full file operation support with MP. Like with open(file, r) etc.

OK , cool I will make some test, Thanks