OpenMV R2 does not execute code without a USB cable

I am using an OpenMV R2 that is connected to an external battery source.
I implemented this simple code to light up the red LED on the R2:

from pyb import LED

led = LED(2) # red led


The program executes without a problem if I keep connecting the USB cable from my laptop to the camera. When I disconnect the OpenMV from the USB cable (so it is now power-less) and connect the external battery to power up the OpenMV without the USB cable, the OpenMV just blinks blue (not red, as I originally programmed it). How can I fix this problem, and what does this blue blinking mean?
Thank you very much.

Did you saved the to the camera?

Hi, thanks for your reply.
No I did not. How can I do that?

file-> save as-> select your camera storage and save as .
you have to replace the existing main .py

Thank you! It worked.

1 Like