Read serial form arduino to a display

Hello guys,

I'm lost in a code and need some ideas, I want to send multiple strings from my arduino to one display.

The idea is with each new message a new line in the display is presented, starting from top to bottom, as if it were a scrool with each new line it passes a down line, the problem is that I can only show a line in the display, When it goes to the second line the code is stopped.

In practice what I wanted to do is the same as the serial monitor does, a debug line-by-line, but in the display. It's possible? So far I have not seen nyone saying it was possible, everything I saw in code does not work or it is too complex to understand.

Thanks in advance.

It's is possible?

It's is a contraction for "it is", so your question is "It is is possible?". Well, maybe.

We can't see your code, so all we can do is assume that you are doing something wrong.

Well, You can see my code, the problem is that I'm still at the beginning, I do not have much to show, but it would be something like this.

While (Serial.available() > 0)
{
lcd.display(line1); //I want to start with this line (first line of the display)

//when the message end, I want that other message is displayed in the second line

if(Serial.readString('\n'))
{
lcd.display(line2);
}

if(Serial.readString('\n'))
{
lcd.display(line3);
}

Until you reach the end of the display line 7
}

The code is pretty basic, but now I think it's best to show what I want to do

Thanks

Have a look at the examples in Serial Input Basics - simple reliable ways to receive data.

...R

      if(Serial.readString('\n'))
      {
          lcd.display(line2);
      }

Serial.readString() returns a String. That statement is like:

      if("That was dumb")
      {
          lcd.display(line2);
      }

Is "That was dumb" true?

If you want to scroll the LCD vertically you need to print what is currently on the second line on the first line then print the new data on the second line. To do this you need to to save what you print on the second line before or after you print it so that you can print it on the first line later.

We cannot tell from your code snippet what sort of data you are printing. More details would help.