One of the most exciting projects with an Arduino is giving the project its own eyes, so to speak. Adding a camera to an Arduino project opens up a broad list of applications, such as monitoring and surveillance systems. In this Learn article, we will be introducing the OV7670 VGA camera, showing how to interface the module with an Arduino Uno, and demonstrating how to open the captured image.
The OV7670 Camera is a VGA camera with an optical lens size of 1/6 inch. The module can be powered with a +3.3V power supply. It can output an image with a resolution of 640×480 and a video rate of 30 fps VGA. For more details on the module, visit Twins Chip’s product page, found here.
First, we should look at the pin configuration of the OV7670 Camera to better understand how to interface it with the Arduino Uno. Below is the table of pins and their functions.
And with that, we are ready to test out the camera.
When programming the Arduino Uno to interface with the OV7670 Camera, we first have to include a couple of libraries. The OV7670 Camera utilizes an I2C interface, which means the library is needed. Here is the list of libraries required:
Some of the important functions in the code are:
To download the sample code, click here.
Compile and upload the code to the Arduino Uno.
Lastly, we need to be able to fetch the data and display it. We need to use a simple GUI called Serial Port Reader to do this. You can download the file here. Run the file and follow the steps below.