 // The TinyGPS++ object
 TinyGPSPlus gps;
 
+int lastExecutionMillis = 0;
+int lastSendMillis = 0;
 // Setup routine runs once when you press reset
 void setup() {
   pinMode(13, OUTPUT);

}

void transmit_coords(double float_latitude, double float_longitude){
  uint8_t coords[6]; // 6*8 bits = 48
  int32_t lat = float_latitude * 10000;
  int32_t lon = float_longitude * 10000;

  Serial.println("Initialized GPS");
  
  led_off();
}

// the loop routine runs over and over again forever:
void loop() {
  int currentMillis = millis(); 

  //if(currentMillis - lastExecutionMillis < 5000){
  //  return;
  //}
  lastExecutionMillis = currentMillis; 
  led_on();
  int available = gpsSerial.available();
  if(available == 0)
    return;
  Serial.println("available bytes from gps: " + String(available, DEC));
  while (available > 0){
    if (gps.encode(gpsSerial.read())){
      displayInfo();
      if (gps.location.isValid() && currentMillis - lastSendMillis > 30000){
        transmit_coords(gps.location.lat(), gps.location.lng());
      }
      break;
    }
    available = gpsSerial.available();
  }
  if(receivedBikeKillSignal()){
    Serial.println("Deactivating Bike...");
  }
  led_off();
}

boolean receivedBikeKillSignal() {
