From 920c857a1e57d38addd628419ddc53360b8165d2 Mon Sep 17 00:00:00 2001 From: Benjamin Chase <52674257+perspector@users.noreply.github.com> Date: Wed, 23 Oct 2024 08:18:47 -0400 Subject: [PATCH] Update LCD.py Removed default display pins on line 48 (different between esp32 and esp8266), set default columns to 8 in line 49, and fixed a typo (changed lines to rows) on line 60. --- LCD.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/LCD.py b/LCD.py index 524a0c0..b8ca4cc 100644 --- a/LCD.py +++ b/LCD.py @@ -45,8 +45,8 @@ class CharLCD(object): E_DELAY = 0.0005 HOMEDELAY = 0.05 - def __init__(self, rs=1, en=3, d4=15, d5=13, d6=12, d7=14, - cols=16, rows=2): + def __init__(self, rs, en, d4, d5, d6, d7, + cols=8, rows=2): """Constructor for LCD. Args: @@ -57,7 +57,7 @@ def __init__(self, rs=1, en=3, d4=15, d5=13, d6=12, d7=14, d6 (int): Data6 GPIO pin. d7 (int): Data7 GPIO pin. cols (int): Number of character columns. - lines (int): Number of display rows. + rows (int): Number of display rows. """ # Define GPIO to LCD mapping self.rs = machine.Pin(rs, machine.Pin.OUT)