mytice
1
Hi all, why is it when I use Realterm to see if my serial.write actually works, my command is different?
My command in sketch: FC 74 01 00 FE 71
Command shown on Realterm: E0 60 66 00 F8 06 FE
My code is just like that:
void setup() {
Serial.begin(9600); // Replace with the appropriate baud rate
// Additional setup code...
}
void loop() {
// Write your command here
Serial.write(0xFC);
Serial.write(0x74);
Serial.write(0x01);
Serial.write(0x00);
Serial.write(0xFE);
Serial.write(0x71);
delay(1000);
}
Do you have the baud rates matched? Is Realterm set to 9600 baud?
How do you have them connected? What sort of board is this running on? You've really left out a ton of detail that might help solve your problem.
1 Like
Serial.write() works as expected, so something else is wrong your setup. Post the details needed for forum members to diagnose the real problem.
Have you tinkered with the communication parameters 8N1?
Serial write is ‘sending’ binary, numeric values…
Most terminals are sending and receiving and displayimg ’ASCII’ text equivalents.
Your numeric output is showing ‘something else’, we need to understand your setup more, but the serial bit rate or framing is a good place to look.
b707
6
It means that your connection between arduino and Realterm is not working
system
Closed
7
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.