# To bootstrap and then use OTA to flash firmware.

esp32:
  board: esp32doit-devkit-v1

esphome:
  name: cat-feeder-cam
  friendly_name: "Cat feeder cam"
  area: Kitchen

packages:
  device_base: !include templates/esp32-cam.yaml

psram:

i2c:
- id: camera_i2c
  sda: GPIO26
  scl: GPIO27

esp32_camera: # Ai-Thinker
  external_clock:
    pin: GPIO0
    frequency: 20MHz
  i2c_id: camera_i2c
  data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
  vsync_pin: GPIO25
  href_pin: GPIO23
  pixel_clock_pin: GPIO22
  power_down_pin: GPIO32

  name: Camera
  resolution: 800x600  # Max 1600x1200.
  idle_framerate: 0.1fps

output:
- platform: ledc
  pin: GPIO4
  channel: 2  # PWM channel 1 is used for esp32_camera.
  id: led

light:
- platform: monochromatic
  output: led
  name: Flash
