Micrropython and the OpenMV IDE


I noticed something today that bothers me. The OpenMV Cam does not execute code.py or main.py if they exist in the root directory. When I am editing code, I do not want to have to do it in the OpenMV IDE because I really do not care much for it at this time. I realize there is a reason to have and use it and I will at those times.

However. I would really prefer that OpenMV Cam would execute the standard autostart files if they are there. Also, the lib directory does not seem to be found. I guess I must have to add that directory to the system path before it will be found. I guess I do not yet understand why everything has to be done through the OpenMV IDE.

I am still gradually working through the documentation but I do not find answers to some questions.


The camera will automatically execute main.py at boot. E.g the blue blinking led behavior is main.py running.

OK. I see a blinking green, solid white, and blinking red which must indicate an error.


No, the blinking green LED is the bootloader. Solid white happens while the camera is booting, then the red led is the computer accessing the file system.

If you updated the main.py script then control is passed to it at that time. So, the blue led blinking will not happen anymore (the default main.py on a fresh openmv cam blinks blue).

The way you save a script to the camera is to use Tools->Save Script to OpenMV Cam, and then Tools-> Reset OpenMV Cam. If the script was saved correctly then the camera will run that script after restarting.

Note that some operating systems cache the write of the main.py update when saving it to the OpenMV Cam. This can cause problems. We have tried to work around this in the IDE issuing flush commands to the file system layer. However, it doesn’t always work.

If you can, use and SD card with the OpenMV cam. This fixes issues as the most operating systems assume a small hard drive size under 16MB is a zip/floppy drive and they adjust the way the file system works.

I can not read the menus because the text is way too small.


I have a 64Gb SD Card in my OpenMV Cam.