String datain;
void setup ( )
{
Serial.begin (9600);
}
void loop ( ) {
while (Serial.available()){ //Check if there is an available byte to read
delay(10); //Delay added to make thing stable
char c = Serial.read(); //Conduct a serial read
if (c == '#') {break;} //Exit the loop when the # is detected after the word
datain += c; //Shorthand for datain = datain + c
Serial.println(c);
}
}