Hello guys.
I have here this code:
// Buffer to store incoming commands from serial port
String inData;
void setup() {
Serial.begin(9600);
Serial.println("Serial conection started, waiting for instructions...\n\n");
}
void loop() {
while (Serial.available() > 0)
{
char recieved = Serial.read();
inData += recieved;
// Process message when new line character is recieved
if (recieved == '\n')
{
Serial.print("\nArduino Received: \n");
Serial.print(inData);
// You can put some if and else here to process the message juste like that:
if(inData == "+++\n"){ // DON'T forget to add "\n" at the end of the string.
Serial.println("OK. Press h for help.");
}
inData = ""; // Clear recieved buffer
}
}
}
This works only in Arduino Serial Monitor (COM3) with settings: "NEW LINE".
But when I try it on HyperTerminal, it doesn't work. IT just prints serial ... started bla bla lba...
It doesn't have the option: "NEW LINE". What should I do?
If I can only use Arduino Serial Monitor with Com7 (bluetooth), Id use it forever.
PS: if you know an open source program for this, let me know. (made in java or vb).