noob question how to vertical scrolling display


i got a 16x2 display

i want it to do like this.

I message1 I when pressed down --> I message2 I and down agien I message 3 I when pressed ones more back
I message2 I I message3 I I message 1 I to picture one.

i want do be able to do this the reverse way whit up too.

i have made a fast sketch i know the syntax is all messed up but i think u understand, see it as a mind map

int x=0

if down button pressed
if x>4
set x+1
print z

else if up button pressed
if x>-2
set x-1
print z

print z

then my ide of z is that depending on the what x is it going to put different text in z. like

if x= 1
z=message 1
else if x=2
z=message 2.

its the last part with z i cant solve.
is this possible or how do a solve the problem? i have tried to google it but i dont know what to search for.

i have tried to google it but i dont know what to search for.

You are talking about vertical scrolling.
What is called 'scrolling' in Arduinoeese is called shifting in LCDspeak.

Now, to fix up your original post...
If you highlight the stuff below "i want it to do like this." and use the Teletype button (it looks like a typewriter) it will be easier to format.

The stuff you have put into a 'quote' block should have been put in a 'code' block using the button that looks like a '#' symbol.


ok thank you very much i will look it up