repl Vs run

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
KJM
Posts: 158
Joined: Sun Nov 18, 2018 10:53 pm
Location: Sydney AU

repl Vs run

Post by KJM » Fri Apr 22, 2022 1:32 am

I've got an intermittent connection on the camera in an ESP32-CAM board. The board tells me when it failed to take a pic when I'm in interactive mode in the repl

Code: Select all

>>> buf=camera.capture()
E (36000) camera: Camera Capture Failed
but I can't figure out how to capture that result from within a program? buf contains 'false' when a capture fails in run mode, the same as it does in the repl, but how do I catch the 'Camera Capture Failed' output from within my program?

Post Reply