esp32cam capturing and saving image works on repl but not from script
TecDroiD opened this issue · 0 comments
TecDroiD commented
hi,
i want to get some grayscale image from esp32cam module and thought that it's the easiest to capture a raw image, save it and read it via ampy get...
tought...
having the following code in repl:
import camera
camera.init(0,format=camera.GRAYSCALE, framesize=camera.FRAME_VGA)
img = camera.capture()
with open ('image.sc', 'wb') as fp:
fp.write(img)
I can save my image and read it after
now I have saved same code into a script capture.py, uploaded it and ran..
it hangs at write(img)...
and never wakes up again until i press reset button..
... but why?
edit: running on MicroPython dbe5289-dirty on 2022-03-15; ESP32-cam module (microlite) with ESP32