Hi
I am writing this post to ask for the community’s help with an issue that I’m having with OV5640 sensor settings.
I use a custom board with an ESP32-S3 chip connected to an OV5640 sensor. I’m using platformio and trying to update the sensor settings like brightness, vFlip, and hMirror as usual:
// Initialize the camera
esp_err_t err = esp_camera_init(&config);
delay(1000); // added a 1-second delay to let the camera sensor get stable (without this, the image quality was very unstable with a green tint
sensor_t *s = esp_camera_sensor_get();
s->set_hmirror(s, 1);
Even when using settings like this, nothing changes the image quality. So basically even when I specifically ask it to mirror the image, I always get an inverted image (regardless of what I set the setting as)
s->set_hmirror(s, 1);
//or
s->set_brightness(s, 2);
I am trying to figure out what is causing this.
Below is my platformio.ini
[env:esp32cam]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
platform_packages =
platformio/tool-openocd-esp32
board_build.mcu = esp32s3
board_build.flash_mode = dio
board_build.partitions = huge_app.csv
board_upload.flash_size: 4MB
board_build.memory_type= dio_opi
board_build.f_flash = 80000000L
board_build.f_cpu = 240000000L
board_upload.maximum_ram_size = 2097152 ; RAM - 2MB
board_upload.maximum_size = 4194304 ; FLASH - 4MB
build_unflags = -std=gnu++11
build_flags =
-std=gnu++17
-DBOARD_HAS_PSRAM
-DARDUINO_ESP32S3_DEV
-DARDUINO_USB_CDC_ON_BOOT=1
-DARDUINO_USB_MODE=1
lib_deps =
espressif/esp32-camera@^2.0.4
bblanchon/ArduinoJson @ ~6.21.0
fhessel/esp32_https_server @ ^1.0.0
upload_speed = 921600
monitor_speed = 115200
If you can suggest anything, I’d be grateful.
Thanks!