   if (first) {
     first = !first ;
   } else {
-    dist_speed += (speed/3600.0)*10.0*5280 ; 
+    dist_speed += (speed / 3600.0) * 10.0 * 5280 ;
     coord_diff = calc_dist_coord(GPS.latitude, GPS.longitude,
-                                    last_lat, last_lng)*M_TO_FT ;
+                                 last_lat, last_lng) * M_TO_FT ;
     dist_coord +=  coord_diff ;
-    speed = (coord_diff * 360.0 )/5280.0 ;
+    speed = (coord_diff * 360.0 ) / 5280.0 ;
   }
-  
+
   last_lat = GPS.latitude ;
   last_lng = GPS.longitude ;
-    
+
   lcd_print_float(dist_coord) ;
   lcd_print_float(speed) ;
   lcd_print_float(GPS.latitude) ;

Adafruit_GPS GPS(&GPSSerial);
HardwareSerial mySerial = Serial1;

void setup(void)
{
  pinMode(BUT_STOP, INPUT) ;
  pinMode(BUT_STAR, INPUT) ;
  pinMode(BUT_BLUE, INPUT) ;

  attachInterrupt(1,isr_stop,HIGH) ;
  attachInterrupt(0,isr_start,HIGH) ;
  attachInterrupt(4,isr_bluetooth,HIGH);
  
  lcd_init();
  lcd_clear_display();
  lcd_write_str("init");
   
  USBSerial.begin(115200);
  delay(1000);

  GPS.begin(9600);
  
  GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCGGA);
  GPS.sendCommand(PMTK_SET_NMEA_UPDATE_100_MILLIHERTZ) ;
  GPS.sendCommand(PGCMD_ANTENNA);

  delay(1000);
  GPSSerial.println(PMTK_Q_RELEASE);
  lcd_clear_display() ;
}

void loop(void)
{
  /*
  char c = GPS.read();

  if ((c) && (GPSECHO)) {
    USBSerial.write(c); 
  }
  
  if (GPS.newNMEAreceived()) {

    if (GPS.parse(GPS.lastNMEA()) && GPS.fix) {

#include <SoftwareSerial.h>
#include <Adafruit_GPS.h>
extern "C" {
#include "lcd.h"
#include "haversine.h"
}

#define GPSSerial Serial1
#define USBSerial Serial

#define BUT_STAR  3
#define BUT_BLUE  7

#define GPSECHO  true
