Skip to content

Commit fe52e7f

Browse files
newbie15cmaglie
authored andcommitted
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
1 parent 36cfd0a commit fe52e7f

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

libraries/LiquidCrystal/src/LiquidCrystal.cpp

+10-4
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,18 @@ void LiquidCrystal::begin(uint8_t cols, uint8_t lines, uint8_t dotsize) {
158158

159159
}
160160

161+
/*
162+
in some 16x4 LCD when line 3 and 4 are not placed correctly you may try:
163+
setRowOffsets(0x00, 0x40, 0x14, 0x54)
164+
or
165+
setRowOffsets(0x00, 0x40, 0x10, 0x50)
166+
*/
161167
void LiquidCrystal::setRowOffsets(int row0, int row1, int row2, int row3)
162168
{
163-
_row_offsets[0] = row0;
164-
_row_offsets[1] = row1;
165-
_row_offsets[2] = row2;
166-
_row_offsets[3] = row3;
169+
_row_offsets[0] = row0;
170+
_row_offsets[1] = row1;
171+
_row_offsets[2] = row2;
172+
_row_offsets[3] = row3;
167173
}
168174

169175
/********** high level commands, for the user! */

0 commit comments

Comments
 (0)