In Realterm, there is the option to send numbers or send ascii. When I write the bytes on send numbers for eg. 0x01 0x03 0xF2 0xE6 0xFE 0x71 is it the same as my arduino code using serial.write? Is the data write the same format as realterm?
if you select send numbers and If you input, say 21 there and press Send Numbers, it will send a byte which value is 0x15 (21 in decimal). if you had selected send ASCII, it would have sent 2 bytes, the ASCII code for '2' and the one for '1'
In RealTerm You can also enter data directly as hexadecimal 0x15 and press Send Numbers, it would have worked in the same way (the 0x is understood to mean you provided an Hexadecimal representation)
You could easily validate what's sent by writing a small Arduino program listening to the serial and printing the hex values of the received bytes as they come in. Then you'll see what is really sent.
something like this (typed here, not tested)
void setup() {
Serial.begin(115200); Serial.println();
}
void loop() {
if (Serial.available()) {
byte b = Serial.read();
Serial.print("0x");
if (b < 0x10) Serial.write('0');
Serial.println(b, HEX);
}
}
configure realTerm at 115200 bauds and select the Arduino com port. Don't open the IDE's Serial monitor of course.