 void buzzAlarm()
 {
     curState = ALARM_BUZZ;
+    sendGpsData = true;
     mqttClient.publish(stsTopic,"2");
 }
 


void setup()
{
    //Setup pins
    pinMode (start,INPUT);
    pinMode(vibra, INPUT);
    pinMode(interrupter, INPUT);
    pinMode(fuel, OUTPUT);
    
    delay(500);

    setInputPins();    
    setFuel(true);
    calibrateAccel();
    startModule();


void sendGps()
{
    if(sendGpsData) {
      tone(buzzerPin, 100);
      mqttClient.publish(gpsTopic,simClient.getGPS());
      sendGpsData = false;
      noTone(buzzerPin);
      delay(500);  
    }
}

//Function used to detect motion. Tolerance variable adjusts the sensitivity of movement detected.
