Hi I am a newbie of Arduino. I've got a really noob question.
I am trying to use Arduino to get serial data from my device.
From my serial monitor (CoolTerm) I got the following byte array:
15 02 00 12 10 03
By when I used Arduino to echo the serial data, I got this:
Which differs from the result I have from Coolterm
This is the code on Arduino
int byteRead;
void setup() {
// Turn the Serial Protocol ON
Serial.begin(115200);
}
void loop() {
/* check if data has been sent from the computer: */
if (Serial.available()) {
/* read the most recent byte */
byteRead = Serial.read();
/*ECHO the value that was read, back to the serial port. */
Serial.println(byteRead);
delay(100);
}
}
Thanks for your help!