the code is intended to obtain user input through the Serial Monitor.
the msg prints twice when code is run , there are no error messages, User input is accepted.
void loop() {
// put your main code here, to run repeatedly:
Serial.println(msg);
while (Serial.available() == 0 ){
}
}