Open doronbehar opened 7 years ago
That's a heck of a long stty command!
Personally, I just set the terminal to raw mode and disable echo. “Raw mode” is a setting that combines many individual settings into a single option. It's purpose is, as the Mac OS documentation puts it, to “change the modes of the terminal so that no input or output processing is performed”. Note that raw mode does not disable echo, so that has to be done explicitly. Thus:
stty -F $PORT raw -echo $BAUDRATE
The Armadeus wiki suggests adding -echoe -echok
. I did an experiment that shows that these are redundant.
Many websites explaining how to read
Serial
communications from the Arduino board on Linux and MacOSx with a terminal emulator, instruct readers to run a command similar to:Taken from the Arch Linux Wiki Article on Arduino.
Other examples with similar instructions:
Chrisheydrick's article, suggests using
screen
, as already suggested by the targetmonitor
of this project.I think we need to generalize the
monitor
target and automatically set the correct parameters withstty
to Arduino'stty
, as instructed in the examples above. In addition, it might be useful to automatically set (if not explicitly set by the user)$MONITOR_CMD
according to the available commands in$PATH
(last option should beless
IMO).I think using
less
it should suit most users much more thanscreen
, because it's impossible toecho
to Arduino'stty
whilescreen
is reading it's content.Would a PR be welcomed?