Camera Sensor
Camera Sensor
arduinoUnoInut();
After configuring the Arduino, the camera has to be configured. To initialise the camera, we
only have the options to change the register values. The register values need to be changed
from the default to the custom. Also add required delay depending upon the microcontroller
frequency we are using. As, slow microcontrollers have less processing time adding more
delay between capturing frames.
void camInit(void){
writeReg(0x12, 0x80);
_delay_ms(100);
wrSensorRegs8_8(ov7670_default_regs);
writeReg(REG_COM10, 32);//PCLK does not toggle on HBLANK.
}
The camera is set to take a QVGA image so the resolution need to be selected. The function
configures the register to take a QVGA image.
setResolution();
In this tutorial, the images are taken in monochrome, so the register value is set to output a
monochrome image. The function sets the register values from register list which is predefined
in the program.
setColor();
The below function is write to register function which writes the hex value to register. If you
get the scrambled images then try to change the second term i.e. 10 to 9/11/12. But most of
the time this value works fine so no need to change it.
writeReg(0x11, 10);
This function is used to get the image resolution size. In this project we are taking pictures in
the size of 320 x 240 pixels.
captureImg(320, 240);
Step 4: Serial Port Reader for reading Images.
Serial Port Reader is a simple GUI, download it from here. This captures the base64 encode
and decodes it to form an image. Just follow these simple steps to use Serial Port Reader
1. Connect Your Arduino to any USB Port of your PC
YOUTUBE
1. https://youtu.be/C2WHGYmOR-o