I’m having issues when accessing the file system simultaneously from python and a PC over USB.
It seem the list of files are not updating properly on my pc when the files are modified by the board itself.
To recreate, simply run this code on the camera and then add some files from the PC:
import os import pyb LED_red = pyb.LED(1) LED_green = pyb.LED(2) LED_blue = pyb.LED(3) # Clear LEDs LED_red.off() LED_green.off() LED_blue.off() # Go! while (True): # List files in root files = os.listdir() # Remove some reserved directories... if "System Volume Information" in files: files.remove("System Volume Information") # If any files are present, delete one if files: # Print message about file deletion print(files) pyb.delay(1000) # Remove file os.remove("/" + files) # Toggle led to indicate file deletion LED_green.toggle() else: # No files found? print("No files found") pyb.delay(1000) LED_red.off() LED_green.off() LED_blue.off()
Files added by the PC is seen and deleted by the board, but deletions are not seen from the PC?
Is it related to this discussion: http://forums.openmv.io/viewtopic.php?t=202?