CircuitPython driver for OV7670 cameras
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.
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.
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)
Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.