I have a loop that runs to show text on a display. I would like to send information to the arduino on the serial buss. Does anyone have a suggestion how I could get that information to the display?
My initial thought is that there has to be a way to update a variable somehow with the information coming down the serial buss. Am I close?
I imagine that "driving the display" is part of the third path. There is something in there that decides what characters to display. You have to make 2. such that it changes what those characters are, based on what comes in at 1.
Note that serial communications will come in one character at a time, and you probably only want to update the display when you get a full sentence -- say a newline.
You can declare two strings, one for buffering input, and one for what's displayed. When you receive a newline, copy the buffer to "display" and clear the buffer.
Make sure you don't overflow the buffer if the computer sends more data than what can fit.
If you look in the Arduino IDE under "File > Examples > 4.Communications", there are some serial input
examples, although none are too simplistic. Which is kind of strange, because many of the other
examples are trivial by comparison.