Problem connecting to sensors using SoftwareSerial

Hello everybody,

I am trying to make my arduino board take a picture with a JPEG camera (https://www.sparkfun.com/products/10061) with gps info linked to it (20 Channel LS20126 GPS Receiver - GPS-09838 - SparkFun Electronics), and eventually save it on an SD card, which i haven't bought yet. All this i'm doing on a lilypad arduino board (LilyPad Arduino 328 Main Board - DEV-13342 - SparkFun Electronics), not because it should be sewn into fabric, but because the round shape of the board is fitting for the project.

I connected the RX and TX from the GPS sensor to pin 5 and 6, and the enable pin to 7, and use the following code: Arduino program GPS - Pastebin.com . my power supply is 3.3 V, I was told that any higher would ruin the lilypad board.

the problem is, i cannot get any kind of communication to the sensor, if i do a check using gpsserial.available(), it won't go out of the loop. However, setting pin 7 (enable pin) to high does make the GPS LED burn.

The program runs with the following output gives the following output:

     -1
     lat: 999999999 long: 999999999

I have a similar setup with the JPEG Camera, where the SoftwareSerial.available() would also never go true, what did I do wrong/ can I do to fix this?

Many thanks,

Hihaatje

How did you connect it to the Arduino? The linked datasheet doesn't contain pinouts for the sold product. Where do you know from that it's driven by 3V3?

void loop()
{
   
    int c = gpsSerial.read();
    Serial.println(c);
    if(gps.encode(c)){
      Serial.println(c);
     }
    gps.get_position(&lat,&lon, &fix_age);
    Serial.print("Lat: "); Serial.print(lat); Serial.print(" Long: "); Serial.println(lon);
    blink(5);
 
}

After reading 1 (one) character you try to decode the GPS position?
And then you print it using lot's of characters to a serial interface only 4 times as fast as your GPS. Within no time the buffer of the gps serial object overflows and you loose characters.

I found the datasheet on the sparkfun page to be lacking indeed, but one for the LS20026(Dropbox - Error) was better, and they said this sensor is pin to pin compatible.

As for the code, how would you suggest i go about getting the info? im quite new to serial communication.

As for the code, how would you suggest i go about getting the info?

You didn't provide a link to the GPS library you use. I don't like to guess which one you might have downloaded. Is Long/Lat the only information you're looking for?