From fe52e7f04fd52a478bfd326a057767adbdb9a0bd Mon Sep 17 00:00:00 2001 From: newbie15 Date: Tue, 26 Mar 2013 15:44:33 +0700 Subject: [PATCH] Added a note about non-standard row offsets in LiquidCrystal.cpp In my case I had to change it to make my 16x4 LCD work properly Fixes #1333 --- libraries/LiquidCrystal/src/LiquidCrystal.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/libraries/LiquidCrystal/src/LiquidCrystal.cpp b/libraries/LiquidCrystal/src/LiquidCrystal.cpp index 249e0ec9b..9bf508b7b 100644 --- a/libraries/LiquidCrystal/src/LiquidCrystal.cpp +++ b/libraries/LiquidCrystal/src/LiquidCrystal.cpp @@ -158,12 +158,18 @@ void LiquidCrystal::begin(uint8_t cols, uint8_t lines, uint8_t dotsize) { } +/* + in some 16x4 LCD when line 3 and 4 are not placed correctly you may try: + setRowOffsets(0x00, 0x40, 0x14, 0x54) + or + setRowOffsets(0x00, 0x40, 0x10, 0x50) + */ void LiquidCrystal::setRowOffsets(int row0, int row1, int row2, int row3) { - _row_offsets[0] = row0; - _row_offsets[1] = row1; - _row_offsets[2] = row2; - _row_offsets[3] = row3; + _row_offsets[0] = row0; + _row_offsets[1] = row1; + _row_offsets[2] = row2; + _row_offsets[3] = row3; } /********** high level commands, for the user! */