I am having two problems when using this code. First, I get a very low frame rate, about 10 FPS. Secondly, the program will only run for like 10 seconds and stop receiving data. It eventually prints out the error message: "Timeout error while getting board architecture!"

1. In regards to the frame rate, please keep in mind the camera has to jpeg compress images twice to send to the disk and display on the IDE. So, if you click the disable frame buffer option your FPS will go up to about 20 FPS. If you want to save the camera effort then do: sensor.snapshot().compress() to jpeg compress the frame buffer just once.

2. "error message: "Timeout error while getting board architecture!"" -> That would be an IDE issue... which should not be possible for you to run the script because the IDE would have not enabled control of the camera yet.

...

I'm getting some weird issues here however related to the new firmware. I keep getting a disk I/O error. I think it's due to us upgrading the HAL to support the H7... man this stuff just keeps breaking... anyway, Ibrahim is debugging this.

...

Once other note - in your script you are endlessly appending time stamps to a list. You will run out of heap at some point and the system will fail.

Note that you may see time stamps not printed in the terminal when you print them all in one go. This is because the USB serial text fifo only holds about 512 bytes and we don't block the camera when printing text, so, generally, text gets lost if you print too much at one time. The IDE polls the text buffer at 200 Hz so this is only an issue if you print out something very large.

so is it impossible to get the timestamps? because if I do it in another file (i assume you mean another python program), then it won't be the timestamps for the same video...
Also, the program still did not work with the new firmware...

Yes I am using the new firmware. I formatted and cleared out the SD card before using it with OpenMV but I don't think that's the problem because it's the camera that keeps disconnecting from the IDE. I don't think it's due to the cable because I have tried several already. I am using Windows 10.

I did update the firmware (it says 2.8.0). I reformatted and it ran fine, then I tried to run again and the problem happened again. I reformatted again, and then the problem still happened. So yeah, the problem's still there.

Hi, I'm fairly certain there's a bug in this now with the M7. It seems to be fine on the H7. But, not the M7. I don't know the plumbing of the HALs as well as Ibrahim however, so, I have to get him to fix it.

...

Sorry about this. We had all this stuff rather dialed in and bug free we we completed these features. But, trying to stay up to date with MicroPython has been a challenge. Every time we update our MP version stuff like this breaks. I've been able to keep the upper level vision code quite stable given this... but, lower level hardware drivers are a pain.

It's the same code as before. However, I was able to reproduce the issue... when the SD card was not mounted straight. Please check that your OpenMV Cam's SD card is fully inserted and that the pads are coming off of the SD card socket. I have a cam that's got a damaged SD card socket and I was getting all kinds of errors.

Ibrahim is digging deeper into this problem. He doesn't quite know what it is yet. But, it will get solved. There's definitely something funny going on with using the "with open" construct related to MicroPython - we've noticed that if you stop the cam using that call it crashes. If you try to open and close a file in the regular way things might improve.

It sounds like you may just have an IDE timeout issue and it's disconnecting because the camera didn't respond to a command in time. If the light keeps flashing then the camera is working fine and it's just the IDE disconnecting.

I am using the code in this discussion but am unable to get images or videos (jpg or mjpeg) to save. The file name will only show up on my computer once I have disconnected the device and reconnected it but will have zero bytes in it.

I am using the code in this discussion but am unable to get images or videos (jpg or mjpeg) to save. The file name will only show up on my computer once I have disconnected the device and reconnected it but will have zero bytes in it.

Any help would be greatly appreciated!

I am using a mac with the M7.

Are you still having this problem ? You should use the IDE to reset the camera instead of disconnecting it to give it a chance to unmount the filesystem.