Hi,
I'm a newbie. I'm using a Teensy version 3.5. Through the serial port 3 (Serial3), I'm trying to create a communication with a sensor. The sensor receives commands via messages in ASCII code and sends data using the ASCII code as well.
I checked that the serial port connection is created. I can also get the sensor readings from the serial port but when I try to send a command, the sensor doesn't interpret it well. For example, when I send the "reset" command, the following happens:
I don't understand why that character appears at the beginning. The command was sent through the serial connection as follows:
The communication is created as follows:
Who is responsible for writing that black diamond with a white question mark? Is it a software configuration problem?
I'm using the arduino IDE. Is it an IDE configuration problem?
Thank you
I'm a newbie. I'm using a Teensy version 3.5. Through the serial port 3 (Serial3), I'm trying to create a communication with a sensor. The sensor receives commands via messages in ASCII code and sends data using the ASCII code as well.
I checked that the serial port connection is created. I can also get the sensor readings from the serial port but when I try to send a command, the sensor doesn't interpret it well. For example, when I send the "reset" command, the following happens:
Code:
reset
ERROR .....
�reset
^
Main->000.156
000.162
000.162
I don't understand why that character appears at the beginning. The command was sent through the serial connection as follows:
Code:
size_t bytes_transferred = 0;
bytes_transferred += Serial3.write('r');
bytes_transferred += Serial3.write('e');
bytes_transferred += Serial3.write('s');
bytes_transferred += Serial3.write('e');
bytes_transferred += Serial3.write('t');
bytes_transferred += Serial3.write('\n');
The communication is created as follows:
Code:
Serial3.begin(9600, SERIAL_8N1);
while (!Serial3) {;} // Wait for serial port to connect
while (Serial3.read() >= 0) {;}
Serial.println(F("Create connection by Serial3 with sensor\nSend reset command"));
Who is responsible for writing that black diamond with a white question mark? Is it a software configuration problem?
I'm using the arduino IDE. Is it an IDE configuration problem?
Thank you