   }
 }
 
+void doShowMenu()
+{
+  Serial.println("SD Card Tester commands");
+  Serial.println("-----------------------");
+  Serial.println("m: Show menu");
+  Serial.println("r: Reads contents of file");
+  Serial.println("w: Write contents to file");
+  Serial.println();
+}
 
 // Reads contents from specified file and returns
 // the contents as String that will be printed to

{
  Serial.begin(9600);

  Serial.println("SD Card Tester commands");
  Serial.println("-----------------------");
  Serial.println("r: Reads contents of file");
  Serial.println("f: Write contents to file");

  // Call begin to initialize SD Card
  sd.begin();


  if (inputLength == 0)
  {
    Serial.println("Error: No valid input was found!\n");
    return;
  }

  // Convert char string to string. SDCard writeFile method expects String.
  String message = String(buffer);

  Serial.println("Writing to " + String(FILENAME) + ":");
  Serial.println(message);
  Serial.println();

  bool isSuccess = sd.writeFile(FILENAME, message);

  if (isSuccess)
  {
    Serial.println("Message written to file successfully!\n");
  }
  else
  {
    Serial.println("Error: Could not write message to file!\n");
  }
}

