Loading...
Pages: [1]   Go Down
Author Topic: Arduino Uno R3 and Linksprite LS-Y201 Serial Transmission Problem  (Read 568 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've been trying to get the camera to work for awhile now, and it just isn't having it.
I'll post my code and the responses I've been getting, and we'll see if anyone has any input.

I'm using the JPEGCamera library, which I've slightly modified to work with Software Serial, and added a few functions to set the baud rate and change the camera picture size. The code for the library will be posted below as well.

Currently, the camera is correctly set to take pictures that are 160x120, and the baudrate is set for 38400.

All attempts to change the baud rate have ended in miserable failure, even after multiple power cycling on the camera, and changing the code to work with a new baud rate.

My Code
http://pastebin.com/qK7JpcVJ

JPEGCamera Library, Modified
http://pastebin.com/1T5W3qbV

The Datasheet

My Data

I would have posted using the normal code format, but the post was too long.

The problem I've been having is the transmission speed, and the fact that I'm getting an incorrect response from the camera when I send the read data command.
The camera takes probably 10 minutes to transmit a 3.8k file to the arduino, which I believe is an indication that something is wrong.

I have read about Serial latency issues on Arduino, and I downloaded the changed rxtxSerial.dll, but that has changed nothing so far.

I'll post the responses I've been getting and debugging data shortly.

So, the responses for the reset, take picture, and getsize command all come in alright.
Then, as soon as I start requesting data, the 5 bytes before the colon should be 76 00 32 00 00, every single time, if I'm not mistaken.
« Last Edit: December 08, 2012, 07:14:01 pm by horotho » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've been struggling with this camera myself recently!

Have you tried the sketch on the linksprite website? Using that (under windows) I can get a picture that makes sense. I can see from the data that you posted that the camera isn't giving a valid jpeg (it should start ff d8...).

Thank,

Alex
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I tried out your code but can't get any response from the camera. All I get is:
BEGUN
Camera finished initializing.
Resetting Camera

The program stops after:
Code:
count = camera.reset(response);

Any suggestions?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can try this library, and one the of examples there: one for HW serial the other for software serial:
http://code.google.com/p/linksprite-serial-cam-arduino/

I get perfect results with it and pretty fast (even for the higher res pictures of 640x480).
HTH
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried your code but no chance, the program stops at
Code:
cam.takePicture();
. There is no response from the camera.
May be I have the wrong camera: I should have the TTL-camera, the backside looks like the attached picture.

Thanks
Pascal
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It definitely does not look the same as mine! So I am not sure if it will work. I know someone else is working with the code on the google code site and it works. Sorry.
Logged

Pages: [1]   Go Up
Print
 
Jump to: