It just so happens that I have an OV5640 module on-hand, so I was able to try the pin config you posted.
I think I know what's happening here - the camera isn't actually powered. The 3V3 pin on the PowerFeather board is controlled via a pin. Normally, it's initially enabled during the Board::init
function call. I assume this was not done in your case as well (as I have also done so in my attempt at this).
So to quickly test this without pulling in PowerFeather-SDK for now, add the following lines at the beginning of app_main
:
gpio_reset_pin(4); // GPIO4 controls the 3V3 output
gpio_set_direction(4, GPIO_MODE_OUTPUT);
gpio_set_level(4, 1);
This manually sets high the pin that enables the 3V3 output.
Side note, I found that I had to modify the file main/CMakeLists.txt
for the entire example to work:
idf_component_register(SRCS take_picture.c
PRIV_INCLUDE_DIRS .
PRIV_REQUIRES nvs_flash esp_psram) # added esp_psram
On my end, it seems the example succeeds once I've done the changes above:
(589) cam_hal: cam init ok
I (592) sccb: pin_sda 35 pin_scl 36
I (596) sccb: sccb_i2c_port=1
I (610) camera: Detected camera at address=0x3c
I (611) ov3660: Mismatch PID=0x5640
I (613) camera: Detected OV5640 camera
I (614) camera: Camera PID=0x5640 VER=0x00 MIDL=0x00 MIDH=0x00
I (1312) s3 ll_cam: node_size: 3840, nodes_per_line: 1, lines_per_node: 6
I (1312) s3 ll_cam: dma_half_buffer_min: 3840, dma_half_buffer: 15360, lines_per_half_buffer: 24, dma_buffer_size: 30720
I (1319) cam_hal: buffer_size: 30720, half_buffer_size: 15360, node_buffer_size: 3840, node_cnt: 8, total_cnt: 10
I (1330) cam_hal: Allocating 153600 Byte frame buffer in PSRAM
I (1337) cam_hal: cam config ok
I (1354) ov5640: Set PLL: bypass: 0, multiplier: 8, sys_div: 1, pre_div: 1, root_2x: 0, pclk_root_div: 1, pclk_manual: 1, pclk_div: 4
I (1355) ov5640: Calculated XVCLK: 20000000 Hz, REFIN: 20000000 Hz, VCO: 160000000 Hz, PLL_CLK: 64000000 Hz, SYSCLK: 16000000 Hz, PCLK: 8000000 Hz
I (1388) example:take_picture: Taking picture...
I (1672) example:take_picture: Picture taken! Its size was: 153600 bytes
Let me know if this solves your issue.