Would it be possible to reference the cascade file stored on the flash instead of the usd (in case you don’t want to use external memory) ?
I stored the file body.cascade on the flash memory and ran the main.py to store some log.txt file to make sure the location is correct.
I tried with os.listdir() and it plots this in the terminal:
>>> ['log.txt', 'openmv.inf', 'README.txt', '.fseventsd', '.Trash-1000', 'body.cascade', 'main_backup.py', 'main.py']
So the body.cascade is there.
If i then call
face_cascade = image.HaarCascade("/body", stages=25)
it seems to halt there, meaning it can’t find the file path for the body.cascade? (Tried also without the forward slash)
This is the main.py which is stored on the flash:
import sensor, time, image, os
sensor.reset()
sensor.set_contrast(1)
sensor.set_gainceiling(16)
sensor.set_framesize(sensor.HQVGA)
sensor.set_pixformat(sensor.GRAYSCALE)
files = os.listdir()
f = open('log.txt', 'w')
f.write(str(files))
#If i would f.close() the file here, it would correctly print out the list of files.
face_cascade = image.HaarCascade("/body", stages=25)
#Seems to never get to the below line.
f.write("-------")
f.close()
PS. Is there a way to see the a print command in a terminal when it’s in standalone mode or do i need to use uart?
I tried with
Screen /dev/ttyACM0 -L 115200
and
Screen /dev/ttyACM0 -L 115200
The latter brings me in micropython emulation mode, but none shows me a print(“…”) output.