Open Lucho1976 opened 7 years ago
@Lucho1976 Hi, Please try add some 'yield() ' in the code.
Regards.
I already did it on myCAMSaveToSDFile function. it already worked fine but i format my computer, reinstall arduino and arducam and now does not work, may be different version. Now i have 2.2.2
Is this ok the place where i add the yield(), is this ok ? Thanks a lot.
//Read JPEG data from FIFO
if ( (temp == 0xD9) && (temp_last == 0xFF) ) //If find the end ,break while,
{
buf[i++] = temp; //save the last 0XD9
//Write the remain bytes in the buffer
myCAM.CS_HIGH();
outFile.write(buf, i);
yield() ; //HERE
yield() ; //HERE
//Close the file
outFile.close();
Serial.println(F("Image save OK."));
is_header = false;
i = 0;
}
if (is_header == true)
{
//Write image data to buffer if not full
if (i < 256)
buf[i++] = temp;
else
{
//Write 256 bytes image data to file
myCAM.CS_HIGH();
outFile.write(buf, 256);
yield() ; //HERE
yield() ; //HERE
i = 0;
buf[i++] = temp;
myCAM.CS_LOW();
myCAM.set_fifo_burst();
}
}
@Lucho1976 Hi, You can try add yield like the below code. We suggest you check your hardware connection firstly. Maybe your hardware exist some bad connections. buf[i++] = temp; //save the last 0XD9 yield() ; //HERE yield() ; //HERE //Write the remain bytes in the buffer myCAM.CS_HIGH(); outFile.write(buf, i);
//Close the file outFile.close(); Serial.println(F("Image save OK.")); is_header = false; i = 0; } if (is_header == true) { //Write image data to buffer if not full if (i < 256) buf[i++] = temp; yield() ; //HERE yield() ; //HERE else { //Write 256 bytes image data to file myCAM.CS_HIGH(); outFile.write(buf, 256);
Regards, ArduCAM support team.
Hi Guys it work fine with 800x600 resolution but above that same problem. I added some more yield but the same thing.
I have an arducam V2 and a OV2640 ( REV. B) 2MP
I tried with memorysaver.h in this two configuracion and compile the whole project but wich one is the correct? :
A)
//Step 1: select the hardware platform, only one at a time //#define OV2640_MINI_2MP //#define OV5642_MINI_5MP //#define OV5642_MINI_5MP_BIT_ROTATION_FIXED //#define OV5642_MINI_5MP_PLUS //#define OV5640_MINI_5MP_PLUS
//#define ARDUCAM_SHIELD_REVC
//Step 2: Select one of the camera module, only one at a time
//#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 MT9T112_CAM
//#define MT9D112_CAM
B)
//Step 1: select the hardware platform, only one at a time
//#define OV5642_MINI_5MP //#define OV5642_MINI_5MP_BIT_ROTATION_FIXED //#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
//#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 MT9T112_CAM
//#define MT9D112_CAM
if you think i can try another thing or add some other yield in other section of the function i will appreciate so much.
Regards
Now is working with configure A) in OV2640_1280x1024 and it's fine to me.
Thank you guys
Again i got WDT reset, i add some serial.println and it fails just in this lines:
outFile.write(buf, 256);
i added 2, 4, 8 yield() but the same problem. i tried with A) and B) memorysaver.h above described but the same thing.
When i use the /capture demo i can visualize perfectly the image but i can't write to SD card. Also connected the camara direct to the board ( no duppont wires )
The sd CARD is in FAT32, is that right ?
Can you help me?...
thank
@Lucho1976 Hi, yes, you can use the SDFormatter software to format your SD card firstly. http://sdformatter.software.informer.com/
Let us know if you need more help. Regards, ArduCAM support team.
HI Guys when i set a resolution above 320x240 i get an wd reset arduino. Dou you know why?.
I have an OV2640 2 MP and running the V2_capture2sd example.
I get this error:
SD Card detected! OV2640 detected. Star Capture Capture Done. The fifo length is :67588
Soft WDT reset
ctx: cont sp: 3ffef9d0 end: 3ffefe00 offset: 01b0
ets Jan 8 2013,rst cause:2, boot mode:(3,7)
load 0x4010f000, len 1264, room 16 tail 0 chksum 0x0f csum 0x0f ~ld