Hi there,
I’m using the 20x4 serial enabled LCD from sparkfun. (It has no backpack; it’s the 2.5 version.) Here’s the link for reference:
http://www.sparkfun.com/datasheets/LCD/SerLCD_V2_5.PDF
Also, using the SerLCD library on the Arduino playground site:
http://arduino.cc/playground/Code/SerLCD
I’m having trouble setting the cursor to anything on lines 3 and 4. For some reason, setCursor() seems to ignore or drop any calls which specify lines 3 or 4. You can just dump text to it, and it’ll wrap around and fill those lines. But you can’t just jump there and start displaying. I have tried setting 20x4 mode by writing to the LCD explicitly, with no effect.
Here is the test code:
void DisplayTopMenu() {
lcd.clear(); delay(100);
lcd.print("Run Auto"); delay(100);
lcd.setCursor(2,1); delay(100);
lcd.print("Run Once Now"); delay(100);
lcd.setCursor(3,1); delay(100);
lcd.print("Stop"); delay(100);
lcd.setCursor(4,1); delay(100);
lcd.print("Setup"); delay(100);
}
And here is the [simulated] output on the display:
Run Auto
Run Once NowStopSetup
FWIW, I hacked the cpp file to default to 20x4 in this part of the SerLCD.cpp:
// Contstructor
// defaults to 16x2 display
serLCD::serLCD(int pin) : SoftwareSerial(pin, pin){
pinMode(pin, OUTPUT);
begin(9600);
_numlines = LCD_4LINE;
_numchars = LCD_20CHAR;
_rowoffset = 0;
}
Any ideas on what I’ve done wrong?
Thanks,
NN