Gps speedometer

It's nice to see the correct loop structure for a GPS program! So many examples are incorrect, and they break when you try to add something. A suggestion for the 70kph speed limit is in the code section below. Before that...

I would suggest using something besides SoftwareSerial. It is very inefficient because it disables interrupts for long periods of time. This can interfere with your sketch or with other libraries. You may notice some delays while the LCD is being updated.

The best choice is to connect your GPS to HardwareSerial (i.e., the Serial object). It doesn't look like you're using it for debug prints, so you might consider that. You would have to disconnect the GPS when uploading, however.

The 2nd best choice is to use AltSoftSerial. It is very efficient, but it only works on pins 8 & 9 (of an UNO). Unfortunately, those pins are used for the LCD.

The 3rd best choice is my NeoSWSerial library. It is almost as efficient, and it works on any two pins (i.e., 2 & 3 in your sketch). It supports baud rates 9600, 19200 and 38400, so you could use it for the GPS device.

The absolute worst choice is SoftwareSerial. It works at all baud rates, on any two pins.

I also wrote the smallest, fastest and most accurate GPS library, NeoGPS. NeoGPS can be configured to only parse the fields you really use (i.e., speed and time). Everything else is quickly skipped. Here's a NeoGPS version of your sketch, with the speed limit test:

#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 13, 9, 4, 5, 6, 7);

#include <NMEAGPS.h>
#include <NeoSWSerial.h>
NeoSWSerial gpsSerial(2,3);
NMEAGPS gps;

const int WARNING_LED = 13;

void setup()
{
  pinMode( WARNING_LED, OUTPUT );

  lcd.begin(16, 2);
  lcd.clear();
  lcd.print( F("tronixstuff.com") ); // F macro saves RAM!
  gpsSerial.begin(9600);
  delay(1000);
  lcd.clear();  
}

void printTime( NeoGPS::time_t & time )
{
  if (time.hours < 10)
    lcd.print( '0' );
  lcd.print( time.hours );
  if (time.minutes < 10)
    lcd.print( '0' );
  lcd.print( time.minutes );
  if (time.seconds < 10)
    lcd.print( '0' );
  lcd.print( time.seconds );

} // printTime


void displayGPS( gps_fix & fix )
{
  int kmh = 0;

  // Print speed
  lcd.setCursor(0,0);
  if (fix.valid.speed && (fix.spd.whole > 5)) {
    kmh = (fix.spd.whole * 185) / 100;
  }
  lcd.print( kmh );
  lcd.print( F(" km/h      ") );

  if (kmh > 70)
    digitalWrite( WARNING_LED, HIGH );
  else
    digitalWrite( WARNING_LED, LOW );

  // Print time
  if (fix.valid.time) {
    printTime( fix.dateTime );
  }
} // displayGPS

void loop()
{
  while (gps.available( gpsSerial )) {  // if there is data coming from the GPS shield
    gps_fix fix = gps.read();           // get the complete fix structure
    displayGPS( fix );                  // Show pieces of the fix on the LCD
  }
}

Notice that the GPS speed is calculated with integer values, not floating-point numbers. The TinyGPS library uses floats, so this is much faster and uses much less program space. It also checks for a minimum speed value to display. Below 5kph, the speed will jump around to different small values.

The original sketch used 7818 bytes of program space and 347 bytes of RAM.
The NeoGPS version uses 6536 bytes of program space and 196 bytes of RAM, a significant savings.

If you want to display the local time instead of the UTC (GMT) time, the NeoGPS time structure is easy to shift. Just add these lines of code, and print localTime instead of fix.dateTime:

    // Print time
    if (fix.valid.time) {

      NeoGPS::clock_t seconds = fix.dateTime;

      // Set these values to the offset of your timezone from GMT
      const int32_t         zone_hours   = -5L; // EST
      const int32_t         zone_minutes =  0L; // usually zero
      const NeoGPS::clock_t zone_offset  = (zone_hours * 60 + zone_minutes) * 60;

      // Adjust for local time
      NeoGPS::time_t localTime( seconds + zone_offset );

      printTime( localTime );
    }

The NMEAtimezone.ino example program shows how to detect Daylight Savings Time, if you'd like that, too.

If you want to try it, be sure to get NeoSWSerial from the link above. You can also get NeoGPS from the Arduino IDE Library Manager, under the menu Sketch -> Include Library -> Manage Libraries.

Cheers,
/dev