Connect OV7670 Module to Arduino Nano Every

I bought an Arduino Nano Every board and an OV7670 Camera Module to try to connect the camera to the board and stream the live footage to a screen. Since the screen is still being shipped i decided to try to stream the camera's footage directly to my pc. The problem is i never used an arduino before and have no idea how to make it happen. I already connected the needed pins from the cam to the board:

Camera Pin: Arduino Pin
VCC: 3.3V
GND: GND
SCL (Serial Clock): A5
SDA (Serial Data): A4
XCLK (External Clock): D2
PCLK (Pixel Clock): D3
D0-D7 (Data Lines): D4 - D11
VS: D12
HS: D13

For now Chatgpt provided me with the following Arduino Code:

#include <ArduCAM.h>
#include <Wire.h>

// Define ArduCAM pins
#define CS_PIN      10  // Chip Select pin
#define RESET_PIN   9   // Reset pin
#define SDA_PIN     A4  // Serial Data pin
#define SCL_PIN     A5  // Serial Clock pin

// ArduCAM object
ArduCAM myCAM(OV7670, CS_PIN);

void setup() {
  Serial.begin(115200);
  Serial.println(F("ArduCAM Start!"));

  Wire.begin(); // Initialize the I2C bus

  // Initialize ArduCAM module
  myCAM.set_format(JPEG);
  myCAM.InitCAM();
}

void loop() {
  // Start capture
  myCAM.start_capture();

  // Wait for capture to finish
  while (!myCAM.get_bit(ARDUCHIP_TRIG, CAP_DONE_MASK)) {
    delay(10);
  }

  // Read image data length
  int imgSize = myCAM.read_fifo_length();

  // Send image data over serial
  for (int i = 0; i < imgSize; i++) {
    Serial.write(myCAM.read_fifo());
  }

  // Delay before capturing next image
  delay(1000);
}

Please Help

Also, i connected LEDs to the circuit to see if any data is being communicated. (It is)


Why not ask Chatgpt again?

1 Like

Doesn't work. The scripts it gives me don't return any image. I've tried to get it to write me good code for 2 days now.

This tutorial appears to cover what you are trying to do in some detail

https://circuitjournal.com/arduino-OV7670-to-pc

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.