A Linenoise port for Aruino Serial port object I/O.
Linenoise is an interactive line editor with history and optional support for tab key completion.
See the original README for more details about Linenoise. It is provided in the src folder.
- Rename to .cpp to use Arduino Serial object for I/O
- Remove some of the terminal environment detection which is not applicable for a small embedded environment
- Tab character is filtered except for completion
- Added Home and End key escape sequences to navigate to the start and end of the line
- Default maximum history length changed to 20
- Maximum line length changed to 256
- Copy the Linenoise folder to your Arduino libraries.
- #include <Linenoise.h> in your sketch.
- Use the
linenoise
function to input a line of text from the Serial port. See the blocking example sketch. - Use a terminal emulator with ANSI/VT100 escape sequence support.
- Make sure VT100/VT101/VT102 or ANSI escape sequences are enabled.
- Configure the Enter key to send a carriage return (CR).
- Configure new line receive as line-feed (LF) (or implicit CR for every LF).
- Configure the Backspace key as ASCII character 127 or CTRL-H.
- The Delete key must send an escape sequence otherwise it will probably behave like Backspace.