ARDUCAM HELP SOS

I am trying to run a simple code for capture and return the FIFO length and always returns 0 for the length .My code is

//antikeimeno myCAM
ArduCAM myCAM(OV2640,SPI_CS);
const uint8_t ta=0;

void setup() {

uint8_t temp;
uint8_t vid,pid;
Wire.begin();
Serial.begin(115200);
Serial.println(“ArduCAM Start!”);

// set the SPI_CS as an output:
pinMode(SPI_CS, OUTPUT);

// initialize SPI:
SPI.begin();

//Check if the ArduCAM SPI bus is OK
myCAM.write_reg(ARDUCHIP_TEST1, 0x55);
temp = myCAM.read_reg(ARDUCHIP_TEST1);
if(temp != 0x55)
{
Serial.println(“SPI interface Error!”);
Serial.print(temp, HEX);
while(1);
}
Serial.println(“SPI is OK”);

//Check if the camera module type is OV2640
myCAM.rdSensorReg8_8(OV2640_CHIPID_HIGH, &vid);
myCAM.rdSensorReg8_8(OV2640_CHIPID_LOW, &pid);
if((vid != 0x26) || (pid != 0x42))
Serial.println(“Can’t find OV2640 module!”);
else
Serial.println(“OV2640 detected”);

//set to BMP format

myCAM.set_format(BMP);

//start camera

myCAM.InitCAM();

myCAM.write_reg(ARDUCHIP_TIM, MODE_MASK);
myCAM.clear_fifo_flag();

}
void loop() {

uint8_t temp;
int VH,VL;
// uint8_t start_capture = 0;
//aan paththei to snapbutton

if(myCAM.get_bit(ARDUCHIP_TRIG , SHUTTER_MASK)) {

//Flush the FIFO
myCAM.flush_fifo();
//Clear the capture done flag
myCAM.clear_fifo_flag();

//anamonh afeshs koumpiou
while(myCAM.get_bit(ARDUCHIP_TRIG, SHUTTER_MASK));
// start_capture = 1;

//Start capture

myCAM.start_capture();
Serial.println(“Start Capture”);
delay(1000);

//elegxos capture
if(myCAM.get_bit(ARDUCHIP_TRIG ,CAP_DONE_MASK))
{

Serial.println(“Capture Done!”); }

else Serial.println(“Capture faild ” );

uint32_t length ;
uint8_t temp,temp_last;
length = myCAM.read_fifo_length();
if(length >= 393216) //384 kb
{
Serial.println(“Not found the end.”);}
else Serial.println(length);

}//telos butto if
}

Can you help me plz ??

(Sure, let's start by putting code tags around your code)

This is the part that returns 0? The other serial prints return the expected data?

uint32_t length ;
uint8_t temp,temp_last;
length = myCAM.read_fifo_length();
if(length >= 393216) //384 kb
{
Serial.println("Not found the end.");}
else Serial.println(length);

}//telos butto if

Where’s the library for all those calls? Shouldn’t there be a
#define “ArduCAM”
or
#define
kind of call at the top of the sketch?

define or include?

#include <ArduCAM.h>
#include <memorysaver.h>
#include <ov2640_regs.h>
#include <Wire.h>
#include <SPI.h>

i just didnt send them for space economy :stuck_out_tongue: Yes the other parts sends exactly what they suppose to send .Sorry about my english

i just didnt send them for space economy

Would you like us to abbreviate answers, "for space economy"?

Well, OK, what you need to do is...and all your problems will be solved. (Edited for space economy).

As you can see from my number of posts ,i am new at this forum thus i thought that includes and defines wouldn't be necessary because i wrote the hardware i am using .