     }
   }
 }
+
+// Flash the led for the given time (milliseconds)
+void flash(int msecs){
+    digitalWrite(led_pin, HIGH);
+    delay(msecs);
+    digitalWrite(led_pin, LOW);
+}

void loop(){
  // print the string when a newline arrives:
  if (stringComplete) {
    Serial.println(inputString);
    // clear the string:
    inputString = "";

/***************************************************
  Simple serial server
****************************************************/

// Pin 13 has an LED connected on most Arduino boards.
int led_pin = 13;

//serial
String inputString = "";         // a string to hold incoming data
