-
Notifications
You must be signed in to change notification settings - Fork 310
Open
Description
There is a super easy way to add autofocus capability to the OV5640. I'm sure there is a better way, but this method works exceptionally well:
- Add the OV5640 Auto Focus For ESP32 Camera Library in Arduino IDE
- Add the following to the top of mjeg2sd.cpp:
#include "ESP32_OV5640_AF.h"
#include "esp_camera.h"
OV5640 ov5640 = OV5640();
- Add the following after
LOG_INF("Camera model %s ready @ %uMHz", camModel, xclkMhz);:
sensor_t* sensor = esp_camera_sensor_get();
ov5640.start(sensor);
if (ov5640.focusInit() == 0) {
LOG_INF("OV5640_Focus_Init Successful!");
}
if (ov5640.autoFocusMode() == 0) {
LOG_INF("OV5640_Auto_Focus Successful!");
}
Works like a charm!
chizz6-sk
Metadata
Metadata
Assignees
Labels
No labels