Closed GoogleCodeExporter closed 9 years ago
I was annoyed by the same incapability to send special characters.
Attached is a solution for this.
The patch adds a checkbox in the Serial Monitor. When this checkbox is checked,
escaped characters are parsed. The parsed characters are: \r, \n, \t, \b, \f,
\0 and \\.
Even though Java allows 0-characters in a String, mainly for increased
performance, I
have added Serial.write(byte[] bytes, int start, int length).
If you have any comments, please share.
Original comment by qistoph
on 20 Jan 2010 at 5:06
Attachments:
Oh, great. Thanks a lot, I was just gonna smash my head with the wall lol
Could you please tell us how to install this patch though?
Thanks
Original comment by vagh...@gmail.com
on 30 Jan 2010 at 4:26
Original comment by dmel...@gmail.com
on 1 Apr 2010 at 6:25
Original comment by dmel...@gmail.com
on 16 May 2010 at 4:16
Today I noticed my patch doesn't work against the latest trunk version.
Mainly because the status label was removed from the serial monitor.
Attached is a new patch.
I have added a new escape character that I was missing myself and fixed the
compile errors on the status label.
The added character is \x, which can be used to send raw bytes.
Like this: \x00\x02\x04\xff
Or even: an @ is \x40
Since there's no status label to show information to the user, it's now
throwing exceptions that'll land in the output window and prevent the line from
being sent.
Other than the explicit IllegalArgumentExceptions in the source, it could also
throw an ArrayIndexOutOfBoundsException (e.g. for "\x" or "\x0").
If this is not in line with the coding standards of the Arduino IDE, I'd be
happy to help sorting this out.
Original comment by qistoph
on 10 Jun 2010 at 11:01
Attachments:
r989
I just added support for specifying line terminators. Ability to send and
receive arbitrary binary data would be nice, but seems like a separate issue.
I imagine creating a separate UI (e.g. another tab in the serial monitor) for
binary communication, rather than overloading the text field to accept escape
sequences.
Original comment by dmel...@gmail.com
on 11 Jul 2010 at 3:36
Original issue reported on code.google.com by
parsen...@gmail.com
on 19 Sep 2009 at 1:00