A built-in serial monitor in arduino-cli would be great.
hi @sohnryang
Being this a command line tool we believe it's up to the user to choose their preferred way of interacting with the serial connection.
If we were to integrated it into the CLI we'd end up putting a tool inside a tool, and this would be something that we're trying to avoid.
CLI is for users who want to extend their workflows and introduce Arduino into them.
On Linux and Mac OS you can use command line tools to connect to serial ports, screen is stock in both, I believe, or it can be installed quickly via a package manager.
We welcome this feature request nonetheless, as it will be part of our upcoming FAQ.
I'd suggest you use Putty on Windows and I personally use Serial on Mac OS (it seems they released a v2 which I look forward to upgrading to).
Anyway if you search the web for "serial communication app" and add your OS you'll get a lot of options.
Again, if your workflow is terminal based, I'd suggest you implement it through screen.
I often just pull that screen /dev/cu.xxxxxxxx 9600 and it gets the job done if I only need to receive data.
You can of course use this tool to send data to your board.
Look up a tutorial, the terminal can let you do so many beautiful and powerful things :)
@ubidefeo I know tools like screen can be used as serial monitor. I thought that serial monitor integrated to arduion-cli can give users more "Arduino IDE-like" features, such as setting line ending characters on the fly, and showing timestamps in outputs.
I can see the usefulness for a few users. We'd have to implement cross-platform solutions for this, but we can't yet give way for these features, we've definitely talked about this but we're leaning towards adding this to an FAQ and advising users to choose a terminal communication mean, and if we get a lot of requests we might being it to the roadmap :)
Might not be the exact replacement for Serial Monitor, but this is a software that I find very useful. It reads and plots data from your serial port, and also lets you send commands to the board in ASCII or binary format.
Thanks for responding!
One advantage of adding a Serial monitor to arduino-cli is that we could keep the serial monitor open when uploading the sketch just like Arduino IDE.
With 3rd party software, it doesn't know when to stop accessing the port and let the arduino-cli upload the sketch.
It is annoying to close and open the serial monitor every time you want to upload a sketch, especially when the sketch has a bug and you're occupied in trying to debug it
@giripriyadarshan
This would imply having one arduino-cli running as a process doing the Serial Monitor and another one doing your compile/upload.
We should make the two processes be aware of each other and it's out of the scope of the CLI.
Offering Serial Monitor is in our roadmap, but you'll have to stop it to continue the operations on the same board anyway
@ubidefeo
but you'll have to stop it to continue the operations on the same board anyway
Not really.... currently, Arduino IDE offers a Serial monitor which is stopped by the IDE (without erasing the previous outputs) when we are uploading to the board and continues the Serial monitor when the board restarts(after upload).
This would imply having one arduino-cli running as a process doing the Serial Monitor and another one doing your compile/upload.
Yes, probably that's what the IDE does too right?
@giripriyadarshan
the IDE does some behind-the-scene gymnastics to do that
The CLI is meant to do one operation at the time.
Even IDE 2 has a GUI handling the disconnection of the Serial Monitor when it needs to upload.
True that ..... But this was a suggestion ...... When implementing the serial monitor, please implement it like the IDE version not like a 3rd party serial monitor (as they already exist).
we'll do our best :D
Most helpful comment
we'll do our best :D