Go Down

Topic: OV7670 (Read 495 times) previous topic - next topic

janosandi

hello Guys

i want to test my OV7670 camera but no code is working on my Arduino IDE
any working guide to test this camera will be great

thanks alot

pylon

Google gives you at least a dozen tutorials if you enter "OV7670 Arduino". If they don't work for you, you definitely have to provide a lot (I really mean a lot!) more information about your very special setup.

janosandi

i have errors compiling anyone of that dozen of examples & im just asking for working one.

janosandi

#3
May 24, 2019, 06:38 am Last Edit: May 24, 2019, 06:41 am by janosandi
Alot of people talk about the circuitDigest example


how-to-use-ov7670-camera-module-with-arduino



i have just coppied the code & paste it in my Arduino IDE but when i try to compile it i have get errors

any help will be great if anyone have tried this example


Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"

C:\Program Files\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\Arduino\hardware -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\janos\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10805 -build-path C:\Users\janos\AppData\Local\Temp\arduino_build_216539 -warnings=none -build-cache C:\Users\janos\AppData\Local\Temp\arduino_cache_573962 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files\Arduino\hardware\tools\avr -verbose C:\Users\janos\Documents\Arduino\OV7670Test\OV7670Test.ino
C:\Program Files\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files\Arduino\hardware -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\janos\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10805 -build-path C:\Users\janos\AppData\Local\Temp\arduino_build_216539 -warnings=none -build-cache C:\Users\janos\AppData\Local\Temp\arduino_cache_573962 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files\Arduino\hardware\tools\avr -verbose C:\Users\janos\Documents\Arduino\OV7670Test\OV7670Test.ino
Using board 'uno' from platform in folder: C:\Program Files\Arduino\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Program Files\Arduino\hardware\arduino\avr
Detecting libraries used...
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\janos\AppData\Local\Temp\arduino_build_216539\sketch\OV7670Test.ino.cpp" -o "nul"
Generating function prototypes...
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\janos\AppData\Local\Temp\arduino_build_216539\sketch\OV7670Test.ino.cpp" -o "C:\Users\janos\AppData\Local\Temp\arduino_build_216539\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\janos\AppData\Local\Temp\arduino_build_216539\preproc\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\janos\AppData\Local\Temp\arduino_build_216539\sketch\OV7670Test.ino.cpp" -o "C:\Users\janos\AppData\Local\Temp\arduino_build_216539\sketch\OV7670Test.ino.cpp.o"
OV7670Test:454: error: expected constructor, destructor, or type conversion before ';' token

voidwriteReg(uint8_t reg, uint8_t dat){

                                       ^

C:\Users\janos\Documents\Arduino\OV7670Test\OV7670Test.ino: In function 'void wrSensorRegs8_8(const regval_list*)':

OV7670Test:502: error: 'writeReg' was not declared in this scope

   writeReg(reg_addr, reg_val);

                             ^

C:\Users\janos\Documents\Arduino\OV7670Test\OV7670Test.ino: In function 'void setResolution()':

OV7670Test:513: error: 'writeReg' was not declared in this scope

 writeReg(REG_COM3, 4); // REG_COM3 enable scaling

                     ^

C:\Users\janos\Documents\Arduino\OV7670Test\OV7670Test.ino: In function 'void camInit()':

OV7670Test:518: error: 'writeReg' was not declared in this scope

 writeReg(0x12, 0x80);

                    ^

C:\Users\janos\Documents\Arduino\OV7670Test\OV7670Test.ino: In function 'void setup()':

OV7670Test:588: error: 'writeReg' was not declared in this scope

 writeReg(0x11, 10); //Earlier it had the value:writeReg(0x11, 12); New version works better for me :) !!!!

                  ^

exit status 1
expected constructor, destructor, or type conversion before ';' token





zoomx

In line 454 this
Code: [Select]
voidwriteReg(uint8_t reg, uint8_t dat) {
should be this
Code: [Select]
void writeReg(uint8_t reg, uint8_t dat) {

pylon

I'm missing the link to the example you tried!

zoomx

https://circuitdigest.com/microcontroller-projects/how-to-use-ov7670-camera-module-with-arduino

I believe that the missing space is the only one error since I got it compiled without any other error.

janosandi

i hope so i will test it tonight

thx Guys

janosandi

#8
May 31, 2019, 03:34 pm Last Edit: May 31, 2019, 03:43 pm by janosandi
hello Guys
the code was compiled successfully but when i start the serial port read tool the picture i get it just
a distortion as i see

any ideas ?

my connection is very good soldered to arduino uno & i have checked it twice


Go Up