Hi , i want to connect LinkSprite JPEG Color Camera TTL Interface with arduino UNO rev3
and then the camera take picture and send it using APC220 to my pc / another arduino
It is possible?
Can someone link me anything related?
Do you have a link for this cam that details its specifications and how it operates?
http://www.evola.fr/product_info.php/en/linksprite-jpeg-color-camera-ttl-interface-p-172
this is the link for camera
as far as I see the coding given , it must save into sd but my project need to send image directly into pc using wireless/rf
If you can save the data from the camera to an SD card, you can send it wirelessly, instead. The camera doesn't know what you are doing with the data.
The question will be how long it takes to get the data from the camera and send it out via a serial port. The answer is "a long time". Your frame rate will be measured in frames per hour, not frames per second.
Your frame rate will be measured in frames per hour, not frames per second.
Well, that might be somewhat overstated. Back in the day I use to download .jpg pictures and files much faster than that using a 14.4 modem.
If I use the lowest resolution can it reduce the "long time"?
My teacher says that I just need to learn the concept and he don't care the quality of the picture
blizzard:
If I use the lowest resolution can it reduce the "long time"?
My teacher says that I just need to learn the concept and he don't care the quality of the picture
The link you provided has info and some arduino code. What have you tried so far?
As of Arduino 1.0, the 'BYTE' keyword is no longer supported.
Please use Serial.write() instead.
This is the error after I verify the code given
As of Arduino 1.0, the 'BYTE' keyword is no longer supported.
Please use Serial.write() instead.This is the error after I verify the code given
So, why don't you follow the compiler's advice?
okay I did not know how to change it to Serial.write
if the code below , can someone change it to Serial.write?
mySerial.print(0x56, BYTE);
mySerial.print(0x00, BYTE);
mySerial.print(0x36, BYTE);
mySerial.print(0x01, BYTE);
mySerial.print(0x00, BYTE);
blizzard:
okay I did not know how to change it to Serial.writeif the code below , can someone change it to Serial.write?
mySerial.print(0x56, BYTE);
mySerial.print(0x00, BYTE);
mySerial.print(0x36, BYTE);
mySerial.print(0x01, BYTE);
mySerial.print(0x00, BYTE);
mySerial.write(0x56);
mySerial.write(0x00);
mySerial.write(0x36);
mySerial.write(0x01);
mySerial.write(0x00);
Or:
mySerial.write ("\x56\x00\x36\x01\x00", sizeof ("\x56\x00\x36\x01\x00")-1);
MichaelMeissner:
blizzard:
okay I did not know how to change it to Serial.writeif the code below , can someone change it to Serial.write?
mySerial.print(0x56, BYTE);
mySerial.print(0x00, BYTE);
mySerial.print(0x36, BYTE);
mySerial.print(0x01, BYTE);
mySerial.print(0x00, BYTE);
mySerial.write(0x56);
mySerial.write(0x00);
mySerial.write(0x36);
mySerial.write(0x01);
mySerial.write(0x00);
Or:
mySerial.write ("\x56\x00\x36\x01\x00", sizeof ("\x56\x00\x36\x01\x00")-1);
thanks for quick reply sir!
Hi all....does anyone know how to change the baud rate from 38400 to 115200...by the way I am using this camera with arduino uno...
Thank you in advance....
You can try this library (it is for arduino-1.0):
http://code.google.com/p/linksprite-serial-cam-arduino/
HTH
Could the baud rate 115200 transmit images faster? maybe 2-3 fps?
Veen:
Could the baud rate 115200 transmit images faster? maybe 2-3 fps?
Estimate the number of bits per image. Add about 10% for the serial framing overhead. Divide that by the serial speed in bits-per-second. That will tell you how many seconds would be required to transmit the image under ideal conditions.
Just to complete my answer: I tested it at 115200 bds it works, so if you use 320x240, which gives around 12Ko / picture, this means you need to transfer abit more than 100000 kbits, which means 1 fps. You may be able to improve that by choosing a worse quality (160x120), I dont know the size of each picture though.
I am facing the same problem with my maga arduino
The problem said ("NewSoftSerial" dose not name a type)
/* Linksprite */
#include <NewSoftSerial.h>
byte incomingbyte;
NewSoftSerial 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)
     {
       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(0x00);
  mySerial.write(0x26);
  mySerial.write(0x00);Â
}
//Send take picture command
void SendTakePhotoCmd()
{
  mySerial.write(0x56);
  mySerial.write(0x00);
  mySerial.write(0x36);
  mySerial.write(0x01);
  mySerial.write(0x00);Â
}
//Read data
void SendReadDataCmd()
{
   MH=a/0x100;
   ML=a%0x100;
   mySerial.write(0x56);
   mySerial.write(0x00);
   mySerial.write(0x32);
   mySerial.write(0x0c);
   mySerial.write(0x00);
   mySerial.write(0x0a);
   mySerial.write(0x00);
   mySerial.write(0x00);
   mySerial.write(MH);
   mySerial.write(ML);Â
   mySerial.write(0x00);
   mySerial.write(0x00);
   mySerial.write(0x00);
   mySerial.write(0x20);
   mySerial.write(0x00);Â
   mySerial.write(0x0a);
   a+=0x20;              //address increases 32£¬set according to buffer size
}
void StopTakePhotoCmd()
{
  mySerial.write(0x56);
  mySerial.write(0x00);
  mySerial.write(0x36);
  mySerial.write(0x01);
  mySerial.write(0x03);   Â
}
Thanks for helping me in advance
NewSoftSerial is an external library that is needed for pre-1.0 arduino IDE. If you use arduino-1.0.x you just need to import the internal software serial library, you also need to change the class to SoftWareSerial.
HTH
Bye
Manu
Hey All,
I've bought 5 cameras now and they all get into this crazy state after one picture is taken.
So... I hook up RX-TX TX-RX 5v GND... I get the Greeting and the "Init end" then I wait and send Take photo.
Everything seems to work. The first time....
Then I can never get the camera to say "Init end" again.... I can get the greeting to come up partially. by taking 5V off and connecting and disconnecting the GND pin. But I only ever get part of the greeting.
It is also like a CTS DTR issue but there are no connectors for that on the camera.
I don't think I need to ground anything on the MEGA to have CTS / DTR set for serial UART correct?
Why the first time and then never again?
The 4 cameras are now unusable. I just want to take a picture and get the JPEG data.
ARGGGGG i've wasted 4-5 days on this... Gezzz...
Any help would be great!