PS:This paragraph is a note added here by me AFTER several hours of replies coming in. The replies you can read below. Thanks to those replies, my question has been answered. I have gone through my posts, editing them in hopes of making the thread more useful for people who peruse it later. I've also tried to answer some of the questions asked in the past ten hours while this has been active. Answer the questions I couldn't answer properly when I first saw them. Anything [thus] in what follows was added after the discussion was completed.
=======================
A "general tools" question...
I have in mind writing some code that would from time to time send characters to the standard serial port, i.e the place where users could easily see them via the IDE's Serial Monitor.
In all of this, I am hoping for a very general answer, just using the serial port easily monitored by the Serial Monitor. "Just" using the pins which are also connected to the electronics which the Arduino development environment uses for programming the Arduino. I.e. using the pins both for the programming and for my purposes at (almost) the same time.
And when I said "general answer", I was also hoping for something that "should" apply to "most" Arduinos... not need qualifying with things like "But on a Mega, you have to..."
===
In my application, the user wouldn't ordinarily wish to take the trouble to look at the data sent. My poor app would "cry in the wilderness".
If I were doing this, and nothing was taking things OUT of the buffer, wouldn't it eventually become full? [The answer to that would be "no". And thus my concern was misplaced.]
[I was foolishly thinking that the port has "handshaking". It doesn't!... and THAT answers my question. Handshake - Wikipedia ]
Once it was full, I am hoping that if new characters were pushed into the buffer, they would merely push the oldest previously sent ones out of the other end, to disappear forever.
Does anyone anticipate any problems for my app if I were to send things to the buffer that passes them "out" via the serial port? Send them even when nothing was connected to "collect" the output?
[The answer to that was "no". The premise (presence of handshaking) that made me fear there might be a problem was flawed.]
===
Why am I asking? Here's a specific instance...
Suppose the app was a small webserver offering a page with the values seen on sensors attached to the Arduino.
Ordinarily, it would sit quietly reading the sensors, updating the webpage it serves up, and responding to requests for the page. (As done by my "Arduservers" (Arduserver.com, or sheepdogguides.com/ardsrv if you want https))
The system would, however, also send a string to the serial port from time to time. A report on errors encountered? Out-of-expected-range values on sensors? These strings might be of interest to the person administering the server if for some reason the users suspected it wasn't running properly. But ordinarily, in my scenario, the information would never be accessed. Often, there wouldn't even be any hardware connected to the output for the serial buffer.
[Such strings might also be used to "display" things like the name and version of the sketch held in the Arduino, or a guide to what external hardware is needed for it to do what it was created to do. As with the previous example, ordinarily, no one would need to look at that information... but it would be available when wanted.
===
"Of course there wouldn't be any problems" might be your reaction.
I'd be delighted if it were! A few such from experienced people would be welcome.
But maybe there's some problem like, (I don't KNOW... that's why I'm asking!)... like the buffer refusing to accept NEW characters when full? [It won't "get full", if you follow some easy precautions of which I will speak.] Could something in my scenario which could create a blocking event? [Probably not.]
===
And finally, just to save helpful people making sure...
Yes! I do understand! If, say, the buffer is 256 bytes wide, and I read from it for the first time after 356 bytes were sent to it, there will be 100 bytes that have been lost forever.
===
I look forward to your thoughts...
Tom