Hi everyone,
I'm new to the Arduino community and loving it! But I find myself stuck with a problem using the 'autoscroll()' function with a standard 16x2 LCD display. I'm hoping one of you experts can tell me where I'm going wrong.
I'm trying to implement a scrolling message along the lower line of the display. I started out with the 'autoscroll' example included with the library and simplified it slightly to include only the scrolling section. So far, so good. However, I find that if I increase the number of 'loops' in the lcd.print section to more than 17, the printing jumps from the lower to the upper line of the display. Any ideas why?
I'm using a duemilanove 328 with v018 software.
I have changed the designation of the lcd interface pins to avoid conflict with an ethernet shield (which is currently attached) and have confirmed that the wiring is correct. The display is acting normally otherwise, and works fine with the other example code.
Thanks guys. Any help would be greatly appreciated!
Here's a simplified version of my code which is enough to demonstrate my problem...
#include <LiquidCrystal.h>
LiquidCrystal lcd(9, 8, 5, 4, 3, 2); // initialize
void setup() {
lcd.begin(16,2); // 16 cols, 2 rows
}
void loop() {
lcd.setCursor(16,1);
lcd.autoscroll();
for (int x = 0; x < 30; x++) { // OK for <17 loops
lcd.print(x); // but problems for more loops.
delay(200);
}
lcd.clear();
}