Hi,
I'm connecting a 20x4 display to my non-arduino hardware, but I'm using the standard Arduino Liquidcrystal library.
I forgot to change the "lcd.begin (16,2)" into declaring that I had 4 lines.
The result is that I can move to lines 0, 1, and 2 just fine, but when I try to go to the last line, I end up on the second line. This is due to:
void LiquidCrystal::setCursor(uint8_t col, uint8_t row)
{
int row_offsets[] = { 0x00, 0x40, 0x14, 0x54 };
if ( row > _numlines ) {
row = _numlines-1; // we count rows starting w/0
}
command(LCD_SETDDRAMADDR | (col + row_offsets[row]));
}
I've set "numlines" to "2" as everybody with a 16x2 does. Now when I go to "row 2" (the third one, which is not present on the 16x2 displays), row is NOT > numlines, so the "if" doesn't trigger. When I try to go to line 3, it "limits my movement" back to line 1, the last one if I had a 16x2.
Am I the first to find this bug? It's been in there for ages....
In researching this I found several "improved" liquidcrystal libraries. Why hasn't one of those been adopted?