Sporadic fatal error (OSError) while reading/writing images

Hi all,

I sporadically get a fatal error with our H7 camera when I create a difference image based on a previously saved file (“bg.bmp”). This error only occurs when the camera is connected via an external power supply. If the IDE is connected to the camera via USB, the error does not occur. The error happens in line 4.

img = sensor.snapshot()

Please avoid using the disk to save pictures to for frame differencing. We did this originally a long time ago when the software was new… but, you can now allocate a second FB in RAM to hold the difference image. This is shown in the example scripts.

Unfortunately, the camera does not have enough RAM for a second frame buffer. Or does the memory usage change when the camera does not need to stream live images via the IDE ?

As mentioned before, the diff function works when the camera is connected via USB. Is there an explanation for this ?

Um, how stable is the external supply? The behavior would be the same.