Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code stuck on cam.capture #24

Open
nadavmisgav opened this issue Sep 16, 2023 · 0 comments
Open

code stuck on cam.capture #24

nadavmisgav opened this issue Sep 16, 2023 · 0 comments

Comments

@nadavmisgav
Copy link

nadavmisgav commented Sep 16, 2023

using ov2640 camera with internal XCLK generation of 24MHz, and when i run

import time

import board
import busio
import digitalio
from adafruit_ov2640 import OV2640, OV2640_COLOR_JPEG, OV2640_SIZE_QVGA

with busio.I2C(scl=board.GP5, sda=board.GP4, frequency=100_000) as bus:
    print("[*] init camera")
    cam = OV2640(
        bus,
        data_pins=[
            board.GP6,
            board.GP7,
            board.GP8,
            board.GP9,
            board.GP10,
            board.GP11,
            board.GP12,
            board.GP13,
        ],
        clock=board.GP14,
        href=board.GP15,
        vsync=board.GP16,
        mclk=None,
        reset=board.GP2,
        shutdown=board.GP17,
        size=OV2640_SIZE_QVGA)

    cam.colorspace = OV2640_COLOR_JPEG

    print("[*] product id:", hex(cam.product_id))
    print("[*] product version:", hex(cam.product_version))
    print("[*] width:", cam.width, "height:", cam.height)

    buf = bytearray(cam.capture_buffer_size)
    print("[*] capturing")
    cam.capture(buf)
    print("[*] done")

the code is stuck on capture, any ideas ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant