Upload program from openmv Board to PC

Hi everyone, I use OpenMV H7 On my company project.
I have some question for OpenMV: How upload program from openmv Board to PC?
Because at current i don’t have original code for current OpenMV board, i want to get code from board to modify program instead of have to build new code for this project.

Thanks & Best Regard!

Do you mean the running script ? You can copy main.py from the camera.

Hi You,
My mean: At my company have a machine using OpenMV H7 Board to detect color of production. And at current the OpenMV H7 Board for this machine was not stable and need to replace new. So i bought new the OpenMV H7 Board to replace and i intended that upload code of old the OpenMV H7 Board and download this code for new the OpenMV H7 Board.
But i don’t know how to upload the code from old the OpenMV H7 Board.
Could you please advise for me,

Thanks & best regard,

Which code ? If you want the Python code, copy main.py. If you want the C/firmware you could use dfu-util or a debugger to read the flash, please google how to do that.

H You,
Yes, i want the Python code. Follow with your instruction, i already copy main.py in old Openmv board (that is running with color detection application) and i open file main.py with OpenMV IDE. But may be the file main.py is not true, becasue it not suitable with color detection application.
This is code in main.py, could you please check:
# main.py – put your code here!
import pyb, time
led = pyb.LED(3)
usb = pyb.USB_VCP()
while (usb.isconnected()==False):
led.on()
time.sleep(150)
led.off()
time.sleep(100)
led.on()
time.sleep(150)
led.off()
time.sleep(600)

Maybe the filesystem was erased, there’s no way to get that code back.

Thanks for your support.
May be i will build a new program.