Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ESP32 CAM 3MP and 5MP resolutions and arbitrary camera clock. #4580

Merged
merged 1 commit into from Mar 19, 2023

Conversation

peterhalicky
Copy link
Contributor

@peterhalicky peterhalicky commented Mar 17, 2023

What does this implement/fix?

Add support for ESP32 CAM resolutions for 3MP and 5MP sensors (OV5640 for example). Also support (almost) arbitrary camera clock, some cameras/ESP chips need slightly lower clock than 20MHz to avoid image corruption.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#2759

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040

Example entry for config.yaml:

esp32_camera:
  name: cam1
  external_clock:
    pin: GPIO32
    frequency: 18MHz
  i2c_pins:
    sda: GPIO22
    scl: GPIO23
  data_pins: [GPIO14, GPIO2, GPIO15, GPIO12, GPIO27, GPIO25, GPIO33, GPIO39]
  vsync_pin: GPIO5
  href_pin: GPIO37
  pixel_clock_pin: GPIO26
  reset_pin: GPIO18
  resolution: FHD
  jpeg_quality: 10
  horizontal_mirror: false
  vertical_flip: true

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

… for example). Also support (almost) arbitrary camera clock, some cameras/ESP chips need slightly lower clock than 20MHz to avoid image corruption.
Copy link
Member

@jesserockz jesserockz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM. Thanks.

@jesserockz jesserockz added this pull request to the merge queue Mar 19, 2023
@jesserockz jesserockz merged commit 5207ca1 into esphome:dev Mar 19, 2023
19 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants