esp32-cam-micropython-2022 icon indicating copy to clipboard operation
esp32-cam-micropython-2022 copied to clipboard

Parameters in camera.init

Open e16384 opened this issue 1 year ago • 5 comments

Dear Mr. Sharil, I've installed your firm v1.18-610-gcf7d962cf-kaki5 (on ESP32Cam), when I try to do this:

import camera
camera.init(0, xclk_freq=20000000) 

I have the error: TypeError: function doesn’t take keyword arguments

Then, how can I change the clock frequency?

Another question, when camera.init() fails, I have tried to do camera.deinit() several times waiting for a second between one attempt and another, but init() still fails. The only solution I've found is to do a reset. Is there any other solution?

Best regards.

e16384 avatar Mar 06 '23 20:03 e16384

Dear e16384 and Sharil,

I have the same problems with camera.init. The camera works without problems with the Arduino IDE, but with micropython I get random crashes. Sometimes immediately and sometimes only after 100 times.

Kindly regards,

Antonio

Antoniomacaroni avatar Apr 26 '23 12:04 Antoniomacaroni

Please have a look at firmwares-20230521

The new firmware supports

>>> import camera
>>> camera.
aecvalue        aelevels        agcgain         brightness
capture         conf            contrast        deinit
flip            framesize       init            mirror
pixformat       quality         saturation      speffect
whitebalance

What you want is camera.conf method.

shariltumin avatar May 21 '23 12:05 shariltumin

Thank you very much!

e16384 avatar May 22 '23 17:05 e16384

I do enter "camera." after "import camera", but the system prompts syntax error. The firmware version is the latest, I can't figure out it. Best regrads.

thecatinbed avatar May 26 '23 14:05 thecatinbed

The firmware does not include help(). As a result, you will not be able to list all methods from the camera module. In the REPL example shown in the README, "camera." means "camera.<TAB>". This is the autocomplete feature of the MicroPython REPL. When a tab character is placed after a module name and a period, all possible attributes following the module are listed. The <TAB> key is usually located in the upper left corner, just below the digit keys, and has an arrow with a bar symbol.

shariltumin avatar May 26 '23 16:05 shariltumin