Skip to content

evan-2005/ArduinoCam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arduino OV7670 Live Camera Stream

Stream grayscale video from an OV7670 camera module on an Arduino Nano 33 BLE to a live window on your PC using Processing.

OV7670 → Arduino Nano 33 BLE → USB Serial → Processing → Live window

Demo

160×120 grayscale at ~4–5 fps over USB serial (921600 baud)

Add a screenshot or GIF here once you have it running.


How it works

Serial protocol

Every frame is sent as:

[ FF AA FF AA ] [ 19 200 bytes of grayscale pixel data ]
  ↑ sync marker   ↑ one byte per pixel, row-major order

The 4-byte sync marker lets the Processing sketch reliably find the start of each frame in the raw byte stream — even if bytes are lost mid-stream, it re-syncs automatically on the next frame.

Components

File Role
arduino/ov7670_stream/ov7670_stream.ino Captures frames from OV7670 and streams over Serial
processing/ArduinoCamera/ArduinoCamera.pde Receives the stream and displays it live

Requirements

Hardware

  • Arduino Nano 33 BLE (or Nano 33 BLE Sense)
  • OV7670 camera module
  • USB cable
  • Jumper wires

Software


Setup

1 — Wire the camera

See docs/wiring.md for the full pin table.

⚠️ The OV7670 runs at 3.3 V. The Nano 33 BLE is 3.3 V native — no level shifting needed. Do not connect to 5 V.

2 — Install the Arduino library

In Arduino IDE: Tools → Manage Libraries → search Arduino_OV767X → Install.

3 — Upload the Arduino sketch

Open arduino/ov7670_stream/ov7670_stream.ino and upload to your board.

The onboard LED will blink rapidly if the camera fails to initialise — check your wiring.

4 — Find your COM port

In Arduino IDE: Tools → Port — note the port name (e.g. COM6, /dev/ttyACM0).

5 — Configure the Processing sketch

Open processing/ArduinoCamera/ArduinoCamera.pde and update this line:

final String COM_PORT = "COM6";   // ← change to your port

6 — Run

Close the Arduino serial monitor (it blocks the port), then run the Processing sketch. You should see the live camera feed appear within a second or two.


Configuration

Constant File Default Description
FRAME_WIDTH / FRAME_HEIGHT .ino 160 / 120 Camera resolution (QQVGA)
BAUD_RATE .pde 921600 Must match Serial.begin() in .ino
COM_PORT .pde "COM6" Serial port of your Arduino
DISPLAY_W / DISPLAY_H .pde 480 / 360 On-screen window size

Performance

Metric Value
Resolution 160×120 px
Bytes per frame 19 200
Baud rate 921 600
Theoretical max fps ~4.8 fps

Serial bandwidth is the bottleneck, not the camera. Reducing resolution or switching to a faster interface (SPI, USB native) would increase framerate.


Project structure

arduino-ov7670-stream/
├── arduino/
│   └── ov7670_stream/
│       └── ov7670_stream.ino     # Arduino sketch
├── processing/
│   └── ArduinoCamera/
│       └── ArduinoCamera.pde     # Processing sketch
├── docs/
│   ├── wiring.md                 # Pin wiring table
│   └── troubleshooting.md        # Common issues & fixes
├── images/                       # Screenshots / diagrams (add your own)
├── .gitignore
└── README.md

Troubleshooting

See docs/troubleshooting.md for common issues.


License

MIT — see LICENSE.

About

Stream grayscale video from an OV7670 camera module on an Arduino Nano 33 BLE to a live window on your PC using Processing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors