i have a 16 by 2 lcd and i wanna try to scroll the 1st line only (full rotational scroll effect if possible) the second line is at stand still can this work??? what code should be used.?
example
1st line: ----> hello world ----> (moving rightwards)
2nd line: my age is 17
im only a beginner and ive tried to do scrolling but both lines keep on moving please help me thx
I don't have your hardware - and very little experience on the Arduino - but I'm willing to work with you until someone more experienced chimes in.
My first suggestion would be to double check that your wiring connections and the lcd definition are in agreement. (I suspect they are, but verification is a Good Thing).
When I looked at the sample program, I noticed that after every lcd.scrollDisplayLeft() there was a delay(150). My second suggestion would be to add the 150 msec delay after each scrolling request and see if it behaves better.
You're using the scrollDisplayLeft()/Right() functions, that do scroll the whole display. If you only want to scroll the top line, you'll have to do it yourself.
Display "hello world", wait a bit, then blank where "hello world" was, move the cursor across one and display it again.
ahh so i need to create my own code that makes the display move.. sorry i thought that i can manipulate the display using the scrollDisplayLeft()/Right() functions, well thx for the info
Did you actually read the first response to your question ?
// scroll 16 positions (display length + string length) to the left
// to move it back to center:
for (int positionCounter = 0; positionCounter < 16; positionCounter++) {
// scroll one position left:
lcd.scrollDisplayLeft();
// wait a bit:
[b]delay(150);[/b]
}
Taken from here:
It might be that your code is working (don't have an LCD to test it right now) but changes the LCD so fast that the liquid crystals int it don't have enough time to become sufficiently "dark", and the eye sees only a "blank" display.
@mromani: The OP's problem was that he wanted only the top line to scroll, rather than both lines, which is what happens when using scrollDisplayLeft()/Right().