Introduction¶
CircuitPython driver for OV7670 cameras
Warning
This module requires the CircuitPython imagecapture
module which is only in the unreleased development version (“Absolute Newest”) of CircuitPython and is only supported on specific boards.
Dependencies¶
This driver depends on:
Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle or individual libraries can be installed using circup.
Usage Example¶
On an Adafruit Metro M4 Grand Central, capture a 40x30 image into a buffer:
import board
from adafruit_ov7670 import OV7670
cam = OV7670(
bus,
data_pins=[board.PCC_D0, board.PCC_D1, board.PCC_D2, board.PCC_D3, board.PCC_D4, board.PCC_D5, board.PCC_D6, board.PCC_D7],
clock=board.PCC_CLK,
vsync=board.PCC_DEN1,
href=board.PCC_DEN2,
mclk=board.D29,
shutdown=board.D39,
reset=board.D38,
)
cam.size = OV7670_SIZE_DIV16
buf = bytearray(2 * cam.width * cam.height)
cam.capture(buf)
Documentation¶
API documentation for this library can be found on Read the Docs.
For information on building library documentation, please check out this guide.
Contributing¶
Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.
Table of Contents¶
Examples
API Reference
adafruit_ov7670
OV7670
OV7670_ADDR
OV7670_COLOR_RGB
OV7670_COLOR_YUV
OV7670_NIGHT_MODE_2
OV7670_NIGHT_MODE_4
OV7670_NIGHT_MODE_8
OV7670_NIGHT_MODE_OFF
OV7670_SIZE_DIV1
OV7670_SIZE_DIV16
OV7670_SIZE_DIV2
OV7670_SIZE_DIV4
OV7670_SIZE_DIV8
OV7670_TEST_PATTERN_COLOR_BAR
OV7670_TEST_PATTERN_COLOR_BAR_FADE
OV7670_TEST_PATTERN_NONE
OV7670_TEST_PATTERN_SHIFTING_1
Related Products