Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

monitor: why not use "cat"? (Question) #652

Open
cdupont opened this issue Dec 28, 2020 · 2 comments
Open

monitor: why not use "cat"? (Question) #652

cdupont opened this issue Dec 28, 2020 · 2 comments

Comments

@cdupont
Copy link

cdupont commented Dec 28, 2020

I see Arduino-Makefile uses "screen" for the monitor. However, it's not very well know for many users...
Why not using a simple "cat"? I use this:

monitor:
         stty -F $(MONITOR_PORT) raw $(MONITOR_BAUDRATE)
         cat $(MONITOR_PORT)

It works well. You can quit with Ctrl-C.

@sej7278
Copy link
Collaborator

sej7278 commented Dec 28, 2020

as i recall cat has buffering issues when you change baudrate - you see the previous output when you make the baudrate faster or something?

also stty is probably more unknown than screen and has differences between macos and linux versions.

you can change MONITOR_CMD in your local Makefile or bind ctrl-c to the kill command in gnu-screen

@rohoog
Copy link

rohoog commented Apr 2, 2021

I would say that a more important reason is that cat is uni-directional: you cannot type any text to your arduino serial port and expect it to be readable using Serial.read or Serial.readBytes, while with gnu-screen you can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants