I am trying to debug the following snippet of code that’s inside the main loop code:
if(Serial.available())
{
char c = Serial.read();
if( c == ‘\n’)
{
ParseCommand(command);
command = “”;
}
else
{
command += c;
ParseCommand(command);
}
}
This the ParseCommand
void ParseCommand(String com)
{
Serial.print("Command => ");Serial.println(com);
}
I have to click on SEND to send each char(s) . It see “\n” as 2 chars ("" “n”) instead of new line.
My question is how to emulate the “\n” using the the IDE Serial Monitor? Along as to send each char when it’s type with out the send button?
Rocket Nut