circuitpython/ports/espressif/esp-idf-config
Jeff Epler 5db6db0128
add esp32-camera
This uses the esp32-camera code instead of our own homebrewed camera code.
In theory it supports esp32, esp32-s2 and esp32-s3, as long as they have
PSRAM.

This is very basic and doesn't support changing any camera parameters,
including switching resolution or pixelformat.

This is tested on the Kaluga (ESP32-S2) and ESP32-S3-Eye boards.

First, reserve some PSRAM by putting this line in `CIRCUITPY/_env`:
```
CIRCUITPY_RESERVED_PSRAM=524288
```
and hard-reset the board for it to take effect.

Now, the following script will take a very low-resolution jpeg file and print
it in the REPL in escape coded form:

```python
import board
import esp32_camera

c = esp32_camera.Camera(
    data_pins=board.CAMERA_DATA,
    external_clock_pin=board.CAMERA_XCLK,
    pixel_clock_pin=board.CAMERA_PCLK,
    vsync_pin=board.CAMERA_VSYNC,
    href_pin=board.CAMERA_HREF,
    pixel_format=esp32_camera.PixelFormat.JPEG,
    i2c=board.I2C(),
    external_clock_frequency=20_000_000)

m = c.take()
if m is not None:
    print(bytes(m))
```

Then on desktop open a python repl and run something like
```python
>>> with open("my.jpg", "wb") as f: f.write(<BIG PASTE FROM REPL>)
```
and open my.jpg in a viewer.
2022-08-04 15:11:50 -05:00
..
partitions-2MB-no-uf2.csv Add AI thinker esp32c3s 2M 2022-02-15 07:00:38 +11:00
partitions-4MB-no-uf2.csv Espressif: add partitions-4MB-no-uf2 2022-02-15 08:42:15 +11:00
partitions-4MB.csv Rename esp32s2 port to espressif 2021-09-13 16:44:55 -07:00
partitions-8MB-no-uf2.csv wip fixes 2022-06-28 18:32:08 -04:00
partitions-8MB.csv Rename esp32s2 port to espressif 2021-09-13 16:44:55 -07:00
partitions-16MB-no-uf2.csv Add more ESP32 boards and enable web workflow 2022-08-01 15:52:08 -07:00
partitions-16MB.csv Rename esp32s2 port to espressif 2021-09-13 16:44:55 -07:00
sdkconfig-2MB-no-uf2.defaults Add AI thinker esp32c3s 2M 2022-02-15 07:00:38 +11:00
sdkconfig-4MB-no-uf2.defaults Espressif: add partitions-4MB-no-uf2 2022-02-15 08:42:15 +11:00
sdkconfig-4MB.defaults Rework configs to take target into account 2022-01-13 15:55:37 -08:00
sdkconfig-8MB-no-uf2.defaults wip; compiles 2022-06-26 21:22:22 -04:00
sdkconfig-8MB.defaults wip; compiles 2022-06-26 21:22:22 -04:00
sdkconfig-16MB-no-uf2.defaults Add more ESP32 boards and enable web workflow 2022-08-01 15:52:08 -07:00
sdkconfig-16MB.defaults Rework configs to take target into account 2022-01-13 15:55:37 -08:00
sdkconfig-ble.defaults wip; compiles 2022-06-26 21:22:22 -04:00
sdkconfig-debug.defaults Refactor pin reset on ESP 2022-01-20 12:40:41 -08:00
sdkconfig-esp32.defaults Disable SPIRAM bankswitch on esp32 2022-07-13 10:56:58 -05:00
sdkconfig-esp32c3.defaults Fix nested categories in update_sdkconfig.py 2022-03-21 17:04:19 -07:00
sdkconfig-esp32s2.defaults Fix S2 builds by not turning on USB with wifi 2022-01-18 15:50:32 -08:00
sdkconfig-esp32s3.defaults add esp32-camera 2022-08-04 15:11:50 -05:00
sdkconfig-opt.defaults wip; compiles 2022-06-26 21:22:22 -04:00
sdkconfig.defaults Clean up and add docs 2022-06-27 13:39:09 -07:00