 
 void arduinoReset() {
   resetCalled = currentMillis;
+  serial_rx_buffer_reset[8] = (byte)((resetCalled & 0xFF));
+  serial_rx_buffer_reset[7] = (byte)((resetCalled >> 8) & 0xFF);
+  serial_rx_buffer_reset[6] = (byte)((resetCalled >> 16) & 0xFF);
+  serial_rx_buffer_reset[5] = (byte)((resetCalled >> 24) & 0xFF);
   serial_rx_buffer_reset[0] = 0xA1;
   serial_rx_buffer_reset[11] = 0xA1;
   for (serial_rx_buffer_counter = 0; serial_rx_buffer_counter < sizeof(serial_rx_buffer_reset); serial_rx_buffer_counter++) {
     Serial.write(serial_rx_buffer_reset[serial_rx_buffer_counter]); //  This line writes the serial data back to the computer as a way to check if the Arduino isn't interpreting wrong values
   }
   Serial.flush();
+  disconnectCalled = currentMillis;
+  serial_rx_buffer_disconnect[8] = (byte)((disconnectCalled & 0xFF));
+  serial_rx_buffer_disconnect[7] = (byte)((disconnectCalled >> 8) & 0xFF);
+  serial_rx_buffer_disconnect[6] = (byte)((disconnectCalled >> 16) & 0xFF);
+  serial_rx_buffer_disconnect[5] = (byte)((disconnectCalled >> 24) & 0xFF);
+  //Serial.println(disconnectCalled);
+  //Serial.println("DISCONNECTING...");
+  serial_rx_buffer_disconnect[0] = 0x0A;
+  serial_rx_buffer_disconnect[11] = 0x0A;
+  for (serial_rx_buffer_counter = 0; serial_rx_buffer_counter < sizeof(serial_rx_buffer_disconnect); serial_rx_buffer_counter++) {
+    Serial.write(serial_rx_buffer_disconnect[serial_rx_buffer_counter]); //  This line writes the serial data back to the computer as a way to check if the Arduino isn't interpreting wrong values
+  }
+  Serial.flush();
+  Serial.end();
+  isConnected = false;
+  disconnectDone = currentMillis;
   delay(5000); // Wait 5 seconds before resetting
+  resetDone = currentMillis;
+  serial_rx_buffer_reset[8] = (byte)((resetDone & 0xFF));
+  serial_rx_buffer_reset[7] = (byte)((resetDone >> 8) & 0xFF);
+  serial_rx_buffer_reset[6] = (byte)((resetDone >> 16) & 0xFF);
+  serial_rx_buffer_reset[5] = (byte)((resetDone >> 24) & 0xFF);
   asm volatile ("  jmp 0");
-  resetDone = currentMillis;
   for (serial_rx_buffer_counter = 0; serial_rx_buffer_counter < sizeof(serial_rx_buffer_reset); serial_rx_buffer_counter++) {
     Serial.write(serial_rx_buffer_reset[serial_rx_buffer_counter]); //  This line writes the serial data back to the computer as a way to check if the Arduino isn't interpreting wrong values
   }

      arduinoReset();
    }
    else if ((serial_rx_buffer[0] == 0x09) && (serial_rx_buffer[11] == 0x09)) {
      // Reset Arduino without reseting Variables
      for (serial_rx_buffer_counter = 0; serial_rx_buffer_counter < sizeof(serial_rx_buffer_disconnect); serial_rx_buffer_counter++) {
        //  Pass Serial Buffer to Reset Buffer
        serial_rx_buffer_disconnect[serial_rx_buffer_counter] = serial_rx_buffer[serial_rx_buffer_counter];
      }
      arduinoDisconnect();

    serial_rx_buffer_disconnect[11] = 0x0B;
    isConnected = true;
    disconnectDone = currentMillis;
    serial_rx_buffer_disconnect[8] = (byte)((disconnectDone & 0xFF));
    serial_rx_buffer_disconnect[7] = (byte)((disconnectDone >> 8) & 0xFF);
    serial_rx_buffer_disconnect[6] = (byte)((disconnectDone >> 16) & 0xFF);
    serial_rx_buffer_disconnect[5] = (byte)((disconnectDone >> 24) & 0xFF);
    for (serial_rx_buffer_counter = 0; serial_rx_buffer_counter < sizeof(serial_rx_buffer_disconnect); serial_rx_buffer_counter++) {
      Serial.write(serial_rx_buffer_disconnect[serial_rx_buffer_counter]); //  This line writes the serial data back to the computer as a way to check if the Arduino isn't interpreting wrong values
    }
