CircuitPython driver for OV5640 Camera
Author(s): Jeff Epler
ESP32-S2 Kaluga Dev Kit featuring ESP32-S2 WROVER <https://www.adafruit.com/product/4729>
Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
- class adafruit_ov5640.OV5640(i2c_bus: busio.I2C, data_pins: List[Pin], clock: Pin, vsync: Pin, href: Pin, shutdown: Optional[digitalio.DigitalInOut] = None, reset: Optional[digitalio.DigitalInOut] = None, mclk: Optional[Pin] = None, mclk_frequency: int = 20000000, i2c_address: int = 60, size: int = 1)¶
Control & Capture Images from an OV5640 Camera
i2c_bus (busio.I2C) – The I2C bus used to configure the OV5640
data_pins (List[microcontroller.Pin]) – A list of 8 data pins, in order.
clock (microcontroller.Pin) – The pixel clock from the OV5640.
vsync (microcontroller.Pin) – The vsync signal from the OV5640.
href (microcontroller.Pin) – The href signal from the OV5640, sometimes inaccurately called hsync.
shutdown (Optional[digitalio.DigitalInOut]) – If not None, the shutdown signal to the camera, also called the powerdown or enable pin.
reset (Optional[digitalio.DigitalInOut]) – If not None, the reset signal to the camera.
mclk (Optional[microcontroller.Pin]) – The pin on which to create a master clock signal, or None if the master clock signal is already being generated.
mclk_frequency (int) – The frequency of the master clock to generate, ignored if mclk is None, requred if it is specified. Note that the OV5640 requires a very low jitter clock, so only specific (microcontroller-dependent) values may work reliably. On the ESP32-S2, a 20MHz clock can be generated with sufficiently low jitter.
i2c_address (int) – The I2C address of the camera.
size (int) – The captured image size
- capture(buf: Union[bytearray, memoryview]) None ¶
Capture an image into the buffer.
- property capture_buffer_size: int¶
Return the size of capture buffer to use with current resolution & colorspace settings
- property test_pattern: bool¶
Set to True to enable a test pattern, False to enable normal image capture