Reputation: 1621
I am trying to send a serial command using my Arduino, but I can't find out how to replicate the Enter
key. I've tried \r\n
as well as \n
and neither of those seem to do it.
I've tried the Arduino functions Serial.write()
Serial.print()
Serial.println()
and none of those work either.
What can I use to replicate the Enter
key?
Thank you
Upvotes: 0
Views: 8499
Reputation: 19
In general, it depends on the application that is processing the key press. From the keyboard, the typical scan code 0x1C is sent to the application for the Enter key (and 0x9C on release).
In PuTTY (related to OP's question here), it sends ASCII CR (carriage return) 0x0D only, even on Windows machines.
Upvotes: 0