Connecting Linksprite JPEG Camera to Arduino Leonardo

Hi there,

Please bear with me, I’m still a newbie ;).

I’m currently trying to connect a Linksprite JPEG Camera (> http://www.evola.fr/product_info.php/en/linksprite-jpeg-color-camera-ttl-interface-p-172) to my Arduino Leonardo.
Because I’ve never used a camera before, I basically have no idea what exactly to do. Searching through the internet revealed the following example code:

#include <SoftwareSerial.h>

byte incomingbyte;
SoftwareSerial mySerial(4,5);                     //Configure pin 4 and 5 as soft serial port
int a=0x0000,j=0,k=0,count=0;                    //Read Starting address       
uint8_t MH,ML;
boolean EndFlag=0;
                               
void SendResetCmd();
void SendTakePhotoCmd();
void SendReadDataCmd();
void StopTakePhotoCmd();

void setup()
{ 
  Serial.begin(19200);
  mySerial.begin(38400);
}

void loop() 
{    
     SendResetCmd();
     delay(4000);                               //After reset, wait 2-3 second to send take picture command
      SendTakePhotoCmd();
     while(mySerial.available()>0)
      {
        incomingbyte=mySerial.read();

      }   
      byte a[32];
      while(!EndFlag)
      {  
         j=0;
         k=0;
         count=0;
         SendReadDataCmd();
         delay(25);
          while(mySerial.available()>0)
          {
               Serial.println(Serial.available());
               incomingbyte=mySerial.read();
               k++;
               if((k>5)&&(j<32)&&(!EndFlag))
               {
               a[j]=incomingbyte;
               if((a[j-1]==0xFF)&&(a[j]==0xD9))      //Check if the picture is over
               EndFlag=1;                           
               j++;
	       count++;
               }
          }
         
          for(j=0;j<count;j++)
          {   if(a[j]<0x10)
              Serial.print("0");
              Serial.print(a[j],HEX);
              Serial.print(" ");
          }                                       //Send jpeg picture over the serial port
          Serial.println();
      }      
     while(1);
}

//Send Reset command
void SendResetCmd()
{
      mySerial.write(0x56);
      mySerial.write((byte)0x00);
      mySerial.write(0x26);
      mySerial.write((byte)0x00);
}

//Send take picture command
void SendTakePhotoCmd()
{
      mySerial.write(0x56);
      mySerial.write((byte)0x00);
      mySerial.write(0x36);
      mySerial.write(0x01);
      mySerial.write((byte)0x00);  
}

//Read data
void SendReadDataCmd()
{
      MH=a/0x100;
      ML=a%0x100;
      mySerial.write(0x56);
      mySerial.write((byte)0x00);
      mySerial.write(0x32);
      mySerial.write(0x0c);
      mySerial.write((byte)0x00); 
      mySerial.write(0x0a);
      mySerial.write((byte)0x00);
      mySerial.write((byte)0x00);
      mySerial.write(MH);
      mySerial.write(ML);   
      mySerial.write((byte)0x00);
      mySerial.write((byte)0x00);
      mySerial.write((byte)0x00);
      mySerial.write(0x20);
      mySerial.write((byte)0x00);  
      mySerial.write(0x0a);
      a+=0x20;                            //address increases 32£¬set according to buffer size
      Serial.println("photo");

}

void StopTakePhotoCmd()
{
      mySerial.write(0x56);
      mySerial.write((byte)0x00);
      mySerial.write(0x36);
      mySerial.write(0x01);
      mySerial.write(0x03);        
}

The code runs without debugging errors, but it can’t get into the while(Serial.available()>0)... loops, because Serial.available constantly remains 0. I know that this means there aren’t any bytes to read, but why is that?
Btw: I have connected the RX-Output to pin 4 and the TX-Output to pin 5.

Thanks for any help in advance,

Kotton