I have an arduino uno connected via USB to a raspberry pi, the raspi is accessible via ssh only.
Just started a bit with arduino-cli ; I upload a sketch which reads my analog pins. How can I access the serial monitor to get the data??
Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It only takes a minute to sign up.Sign up to join this community
Programs such as
minicom or (my favorite)
picocom are useful if you want bidirectional communication
between the Arduino and the host computer. If you only want to read
what the Arduino sends, that can be done with
stty -F /dev/ttyACM0 raw 115200 cat /dev/ttyACM0
$ sudo apt-get install minicom ... blah blah blah ... $ minicom -D /dev/ttyACM0 -b 115200
Minicom can take a bit of getting used to. Use
CTRL-A to initiate a command sequence.
CTRL-A X is exit.
CTRL-A O is configuration ("Options") where you can configure flow control and such.
Many people also use
screen to do the same job, but I like the interface that
minicom gives - it's more terminal-like.
I also had the problem that arduino-cli includes no serial monitor. I tried out screen, minicom and other but they are a bit difficult to get used with them. So I created a small python script which works as an serial monitor in the command line: https://github.com/PBahner/Serial-Monitor