Hi all, I hope some one can shed some light for me as how to send a carriage return and newline inside a spring that is being sent to a serialport. then read back to browser. The new lines are not working. I've tried \n \r \r\n <br> PHP_EOL. I can get this to work via the echo command but not when sending the spring via serial port.
Thanks in anticipation.
$serial->sendMessage("The big Brown Fox jumped over the cold lazey dog") . "<br>";
$serial->sendMessage("Message 2");
// Or to read from
$read = $serial->readPort();
echo $read;
echo "line 1" . "<br>";
echo "line 2" . "<br>";
echo "line 3" . "<br>";
I get the Result below.
The big Brown Fox jumped over the cold lazey dogMessage 2line 1 line 2 line 3