GPS 7 Segment speedometer

Hello guys I am newbe here! I need your help with a code for running a PARALLAX GPS MODULE PMB-648 with arduino duemilanove. I need to extract the NMEA data, just the speed mph and print it to a seven segment display. I am using a 4-digit LED-driver with I^2C-Bus interface SAA106.
I have only basic computer skills loops and switches. Pin TXD in the module goes to RX pin in arduino, but I am not so sure if that is the way is suppose to be connected, and I believe I am suppose to connect the SDA and CLK pins of the IC to pin number 4 and 5 analog input in the arduino. The PDF contains the slave address for the IC. The only code example i have is from arduino playground extracting GPS data I will appreciate a complete code if that is not too much to ask. I attached a picture of the 4-Digit LED-driver and the GPS module.
GPS module
4-digit LED-Driver

 Example code for connecting a Parallax GPS module to the Arduino

 #include <string.h>
 #include <ctype.h>
 int ledPin = 13;                  // LED test pin
 int rxPin = 0;                    // RX PIN 
 int txPin = 1;                    // TX TX
 int byteGPS=-1;
 char linea[300] = "";
 char comandoGPR[7] = "$GPRMC";
 int cont=0;
 int bien=0;
 int conta=0;
 int indices[13];
 void setup() {
   pinMode(ledPin, OUTPUT);       // Initialize LED pin
   pinMode(rxPin, INPUT);
   pinMode(txPin, OUTPUT);
   for (int i=0;i<300;i++){       // Initialize a buffer for received data
     linea[i]=' ';
 void loop() {
   digitalWrite(ledPin, HIGH);;         // Read a byte of the serial port
   if (byteGPS == -1) {           // See if the port is empty yet
   } else {
     linea[conta]=byteGPS;        // If there is serial port data, it is put in the buffer
     Serial.print(byteGPS, BYTE); 
     if (byteGPS==13){            // If the received byte is = to 13, end of transmission
       digitalWrite(ledPin, LOW); 
       for (int i=1;i<7;i++){     // Verifies if the received command starts with $GPR
         if (linea[i]==comandoGPR[i-1]){
       if(bien==6){               // If yes, continue and process the data
         for (int i=0;i<300;i++){
           if (linea[i]==','){    // check for the position of the  "," separator
           if (linea[i]=='*'){    // ... and the "*"
         Serial.println("");      // ... and write to the serial port
         for (int i=0;i<12;i++){
             case 0 :Serial.print("Time in UTC (HhMmSs): ");break;
             case 1 :Serial.print("Status (A=OK,V=KO): ");break;
             case 2 :Serial.print("Latitude: ");break;
             case 3 :Serial.print("Direction (N/S): ");break;
             case 4 :Serial.print("Longitude: ");break;
             case 5 :Serial.print("Direction (E/W): ");break;
             case 6 :Serial.print("Velocity in knots: ");break;
             case 7 :Serial.print("Heading in degrees: ");break;
             case 8 :Serial.print("Date UTC (DdMmAa): ");break;
             case 9 :Serial.print("Magnetic degrees: ");break;
             case 10 :Serial.print("(E/W): ");break;
             case 11 :Serial.print("Mode: ");break;
             case 12 :Serial.print("Checksum: ");break;
           for (int j=indices[i];j<(indices[i+1]-1);j++){
       conta=0;                    // Reset the buffer
       for (int i=0;i<300;i++){    //  
         linea[i]=' ';             




You have velocity in Knots, you just need to convert to MPH (*1.15077). I can't help you with the complete code though, what's the point of the project if not to learn about the platform and technology you're using? Couldn't you just buy a GPS-based speedo if you wanted a finished product? Tutorial for the GPS module Tutorial for the Display

I will say if you are doing a project to learn, you take it up yourself , However i also made a LCD speedometer here >> you may get something in terms of other idea's , It;s not driven by GPS

Hello guys, Thank you for taking the time to help me with my project. I had a problem with the Serial.print(byteGPS, BYTE); I replaced it with Serial.write(byteGPS) because serial print was not suported as of arduino version 1.0. I ran the code and the serial monitor only displays symbols instead of data. The serial monitor displays this Ã333<?fó??fó333<fóÃ<fÿ. If I take the RX pin out of the arduino the flow of symbols stop so I think I am writing the data just not printing it wright. Can you guys helpme to fix the code to get actual NMEA data.

 int rxPin = 0;                    // RX PIN 
 int txPin = 1;                    // TX TX

Those pins are connected to the usb that goes to the computer. If you are using UNO, you need to use NewSoftWareSerial and connect that to the GPS module.

Other than that the serial monitor has to have the same baud rate that your Arduino is set at.

forget all think gps speedometer,i use 4 year and no good,newer no see real speed and place good. better way have wheel sensor,odometer and speed. gps no realti9me and true newer,and how work in cave,other no good place,no newer,i see thats many year,now have new project,real time odo/speed whit LCD.working and true no only "maybe" all data.

Guys, I adjusted the baud rate to 480 bps and now I can see the data in the serial monitor. Latitude, longitude, speed in knots, etc. The next step is how do i print only the speed information to the 4-digit LED-driver with I^2C-Bus interface SAA106. how do I start the code to send the information to the IC. What function should I use and how do I called the IC to read the data. I understand I have to give it a command. I will appreciate your help. Sorry for the dumb questions but I am a newbee with Arduino. This is an example code i found. How can I modify it to pass the data only from the speed send it to the IC and print it in hole numbers?

#include "Wire.h"  // enable I2C bus

byte saa1064 = 0x70 >> 1; // define the I2C bus address for our SAA1064 (pin 1 to GND)

int digits[16]={63, 6, 91, 79, 102, 109, 125,7, 127, 111, 119, 124, 57, 94, 121, 113};
// these are the byte representations of pins required to display each digit 0~9 then A~F

void setup()
  Wire.begin(); // start up I2C bus

void initDisplay()
// turns on dynamic mode and adjusts segment current to 12mA
  Wire.send(B00000000); // this is the instruction byte. Zero means the next byte is the control byte
  Wire.send(B01000111); // control byte (dynamic mode on, digits 1+3 on, digits 2+4 on, 12mA segment current

Start with the first step. Read the entire NMEA string into a buffer. Remember that at the end of each NMEA string is a carriage return and a line feed. Read those in also. The last three printable characters should be something like *7A. Well, it will always be the *, the last two bytes are hex codes and this is a checksum for the string. Its important to compare the checksum against the entire string to make sure you read it correctly.

I found a little code that does this here:

Once you get that working, you want to parse the speed out and throw the rest away.

Convert speed from knots to MPH.

Then send the speed to the display.

Maybe you can configure your GPS receiver module to only send speed. That would make it easier to parse, but you would still need to verify the checksum.