You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use this library with a 16x4 character display. Looking at the code (snippet below) there are hardcoded offsets for the third and fourth rows, with the third row starting at 0x14 (20) and the fourth at 0x54 (84, 20 addresses along from the start of row 2).
This would make sense for a 20x4 LCD. However, for my particular display, row 3 starts at 0x10 (16) and row 4 at 0x50 (80, 64+16). I imagine this would be the case with almost all displays, with the offsets equal to the number of characters in each row.
I had expected the columns and lines arguments to Character_LCD_Mono to automatically handle the offsets for me. My workaround is to modify the class level _LCD_ROW_OFFSETS at runtime:
If there a better way to go about this? If not, would it be possible to add proper support? Perhaps the calculated offsets could be exposed as a property that can be changed for screens that work differently?
The text was updated successfully, but these errors were encountered:
Hello,
I am trying to use this library with a 16x4 character display. Looking at the code (snippet below) there are hardcoded offsets for the third and fourth rows, with the third row starting at
0x14
(20) and the fourth at0x54
(84, 20 addresses along from the start of row 2).Adafruit_CircuitPython_CharLCD/adafruit_character_lcd/character_lcd.py
Lines 72 to 73 in 7cd74e9
This would make sense for a 20x4 LCD. However, for my particular display, row 3 starts at
0x10
(16) and row 4 at0x50
(80, 64+16). I imagine this would be the case with almost all displays, with the offsets equal to the number of characters in each row.I had expected the
columns
andlines
arguments toCharacter_LCD_Mono
to automatically handle the offsets for me. My workaround is to modify the class level_LCD_ROW_OFFSETS
at runtime:If there a better way to go about this? If not, would it be possible to add proper support? Perhaps the calculated offsets could be exposed as a property that can be changed for screens that work differently?
The text was updated successfully, but these errors were encountered: