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
- API Reference
adafruit_ov7670OV7670OV7670_ADDROV7670_COLOR_RGBOV7670_COLOR_YUVOV7670_NIGHT_MODE_2OV7670_NIGHT_MODE_4OV7670_NIGHT_MODE_8OV7670_NIGHT_MODE_OFFOV7670_SIZE_DIV1OV7670_SIZE_DIV16OV7670_SIZE_DIV2OV7670_SIZE_DIV4OV7670_SIZE_DIV8OV7670_TEST_PATTERN_COLOR_BAROV7670_TEST_PATTERN_COLOR_BAR_FADEOV7670_TEST_PATTERN_NONEOV7670_TEST_PATTERN_SHIFTING_1
Related Products