adafruit / Adafruit_CircuitPython_OV2640

CircuitPython driver for OV2640 cameras
MIT License
10 stars 3 forks source link

Add support for Arduino Nano RP2040 Connect & RAW format #10

Closed nikita-kotsehub closed 3 years ago

nikita-kotsehub commented 3 years ago

I could connect OV2640 SPI to Arduino Nano RP2040 Connect and take JPEG images with Arducam's code and then the HostApp. However, their code does not support RAW image format. I thought we could add the functionality for this library? Can anyone here please help me with taking a RAW image with OV2640 SPI on Arduino Nano RP2040 Connect?

I connected OV2640 SPI to Nano RP2040 as follows:

  1. CS - D10 (or any other GPIO port, except A6, A7)
  2. MOSI - D11 (COPI)
  3. MISO - D12 (CIPO)
  4. SCK - D13 (SCK)
  5. GND - GND
  6. VCC - 3.3V
  7. SDA - A4 (SDA)
  8. SCL - A5 (SCL) Refer to the diagram here.

In this library, I figured I need to use class adafruit_ov2640.OV2640(i2c_bus, data_pins, clock, vsync, href, shutdown=None, reset=None, mclk=None, mclk_frequency=20000000, i2c_address=48, size=1. I located the i2c_bus and clock pins, but I am not sure which pins to put for data_pins, vsync, and href. I assume these pins are not relevant to me because I have a SPI connection?

@jepler

jepler commented 3 years ago

The modules from Arducam connect the data, vsync, and href pins internally, so they are not suitable to use with Adafruit_CircuitPython_OV2640. Only modules which expose the necessary pins without processing are compatible.