Running Programs


Is there anyway to have the program run on the OpenMV without having it connected to the OpenMV IDE? I am new to micropython, I know it is not a compiled language, but can it run on the board without having the IDE running the program? I do not see any download buttons on the IDE.


Please do:

Tools->Save Script to OpenMV Cam

And then:

Tools->Reset OpenMV Cam

When I do the “Tools->Save Script to OpenMV Cam”, should there be any indication that the file has loaded successfully? I do “Tools->Save Script to OpenMV Cam”, nothing happens, and then I do “Tools->Reset OpenMV Cam” and the LED’s blink and the board resets. Everything was working earlier today, but now I try to save the same script to the OpenMV Cam and it does not seem to be working at all. If I play from the IDE, it works correctly. Not sure what I changed, but I cannot remember if there were LED’s blinking or an indicator on the IDE when I “Tools->Reset OpenMV Cam”

I formatted my SD card and that fixed it. I believe I accidentally deleted Main and it could never rewrite it, or something along those lines.

When I do the “Tools->Save Script to OpenMV Cam”, should there be any indication that the file has loaded successfully?

Generally, it works on the first shot. However, the system can be hampered by corrupt disk stuff.

So, since the camera’s file system appears tot he PC as a read-only device but is actually writable by the camera… be careful of the OS caching stuff. In particular, your PC will not write files to the camera except when it feels like it. You either need to safety remove the camera or let OpenMV IDE reset the camera to save files on the cam.

I put some extra code int the IDE also that saves the file and then causes extra writes to make sure it gets flushed. But, anyway, if you’re not using the two methods under tools then you’ll run into weird issues related to the OS caching files to be written to the disk and not reading the disk again.

Yes, I wish there was a way to make this better. Note that we’re using the standard MicroPython disk interface for this. All pyboards suffer from these issues and there’s not really a clear fix.

That said, one nice thing… when you use an SD card with the camera your OS will use different drivers which flush all writes much more quickly than with the internal flash of the chip.