ArduCAM / Arduino

This is ArduCAM library for Arduino boards
MIT License
477 stars 350 forks source link

OV2640 functions demo fails to compile on Arduino Mega #383

Open TroyNeubauer opened 5 years ago

TroyNeubauer commented 5 years ago

Hi, I just bought the Arducam Mini 2MP camera and I was trying to get the functions demo working today. I installed the arducam library into the Arduino/Libraries folder and updated memorysaver.h to reflect using the Mini 2MP. For reference it looks like this: `#ifndef MEMORYSAVER

define MEMORYSAVER

//Only when using raspberry,enable it //#define RASPBERRY_PI

//There are two steps you need to modify in this file before normal compilation //Only ArduCAM Shield series platform need to select camera module, ArduCAM-Mini series platform doesnt

//Step 1: select the hardware platform, only one at a time

define OV2640_MINI_2MP

//#define OV3640_MINI_3MP //#define OV5642_MINI_5MP //#define OV5642_MINI_5MP_BIT_ROTATION_FIXED //#define OV2640_MINI_2MP_PLUS //#define OV5642_MINI_5MP_PLUS //#define OV5640_MINI_5MP_PLUS

//#define ARDUCAM_SHIELD_REVC
//#define ARDUCAM_SHIELD_V2

//Step 2: Select one of the camera module, only one at a time

if (defined(ARDUCAM_SHIELD_REVC) || defined(ARDUCAM_SHIELD_V2))

//#define OV7660_CAM
//#define OV7725_CAM
//#define OV7670_CAM
//#define OV7675_CAM

//#define OV2640_CAM //#define OV3640_CAM //#define OV5642_CAM //#define OV5640_CAM

//#define MT9D111A_CAM
//#define MT9D111B_CAM
//#define MT9M112_CAM
//#define MT9V111_CAM   
//#define MT9M001_CAM   
//#define MT9V034_CAM
//#define MT9M034_CAM
//#define MT9T112_CAM
//#define MT9D112_CAM

endif

endif //MEMORYSAVER`

When I try to compile the OV2640 functions demo I get a ton of warnings and one error "ov2640_regs.h:866: error: function definition does not declare parameters"

Here are the complete results from the compiler: C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -IC:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\variants\mega -IC:\Program Files (x86)\Arduino\libraries\Wire -IC:\Program Files (x86)\Arduino\libraries\ArduCAM -IC:\Program Files (x86)\Arduino\libraries\SPI C:\Users\TROYNE~1\AppData\Local\Temp\build7538718831791580415.tmp\ArduCAM_Mini_2MP_OV2640_functions.cpp -o C:\Users\TROYNE~1\AppData\Local\Temp\build7538718831791580415.tmp\ArduCAM_Mini_2MP_OV2640_functions.cpp.o In file included from C:\Program Files (x86)\Arduino\libraries\ArduCAM/ArduCAM.h:760, from ArduCAM_Mini_2MP_OV2640_functions.ino:11: C:\Program Files (x86)\Arduino\libraries\ArduCAM/ov2640_regs.h:9: warning: only initialized variables can be placed into program memory area C:\Program Files (x86)\Arduino\libraries\ArduCAM/ov2640_regs.h:216: warning: only initialized variables can be placed into program memory area C:\Program Files (x86)\Arduino\libraries\ArduCAM/ov2640_regs.h:412: warning: only initialized variables can be placed into program memory area C:\Program Files (x86)\Arduino\libraries\ArduCAM/ov2640_regs.h:426: warning: only initialized variables can be placed into program memory area C:\Program Files (x86)\Arduino\libraries\ArduCAM/ov2640_regs.h:440: warning: only initialized variables can be placed into program memory area C:\Program Files (x86)\Arduino\libraries\ArduCAM/ov2640_regs.h:486: warning: only initialized variables can be placed into program memory area C:\Program Files (x86)\Arduino\libraries\ArduCAM/ov2640_regs.h:532: warning: only initialized variables can be placed into program memory area C:\Program Files (x86)\Arduino\libraries\ArduCAM/ov2640_regs.h:578: warning: only initialized variables can be placed into program memory area C:\Program Files (x86)\Arduino\libraries\ArduCAM/ov2640_regs.h:624: warning: only initialized variables can be placed into program memory area C:\Program Files (x86)\Arduino\libraries\ArduCAM/ov2640_regs.h:672: warning: only initialized variables can be placed into program memory area C:\Program Files (x86)\Arduino\libraries\ArduCAM/ov2640_regs.h:720: warning: only initialized variables can be placed into program memory area C:\Program Files (x86)\Arduino\libraries\ArduCAM/ov2640_regs.h:767: warning: only initialized variables can be placed into program memory area C:\Program Files (x86)\Arduino\libraries\ArduCAM/ov2640_regs.h:815: warning: only initialized variables can be placed into program memory area C:\Program Files (x86)\Arduino\libraries\ArduCAM/ov2640_regs.h:866: error: function definition does not declare parameters ArduCAM_Mini_2MP_OV2640_functions.ino:19: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino: In function 'void setup()': ArduCAM_Mini_2MP_OV2640_functions.ino:49: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:65: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:68: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:79: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:83: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino: In function 'void loop()': ArduCAM_Mini_2MP_OV2640_functions.ino:127: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:132: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:137: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:142: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:147: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:152: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:157: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:162: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:167: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:174: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:188: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:194: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:208: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:211: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:214: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:217: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:220: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:223: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:226: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:229: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:232: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:235: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:238: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:241: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:244: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:247: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:250: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:253: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:256: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:259: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:262: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:265: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:268: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:271: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:274: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:277: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:280: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:283: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:286: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:289: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:304: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:319: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:326: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:329: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:332: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:335: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:338: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:341: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:344: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:347: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:350: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:353: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:356: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:359: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:362: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:365: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:368: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:371: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:374: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:377: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:380: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:383: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:386: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:389: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:392: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:395: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:398: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:401: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:404: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:407: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:442: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:470: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:476: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:482: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:471: warning: unused variable 'temp_last' ArduCAM_Mini_2MP_OV2640_functions.ino: In function 'uint8_t read_fifo_burst(ArduCAM)': ArduCAM_Mini_2MP_OV2640_functions.ino:526: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:531: warning: only initialized variables can be placed into program memory area ArduCAM_Mini_2MP_OV2640_functions.ino:549: warning: only initialized variables can be placed into program memory area

Any help would be much appreciated.

UCTRONICS commented 5 years ago

@TroyNeubauer Please refer to the video demo https://youtu.be/hybQpjwJ4aA