From b9da5d87d8bdb8fcaafbaa4b09e7cd8464e5b25b Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Thu, 15 Mar 2018 08:35:45 +0000 Subject: [PATCH] slight increase in timings to sort pilcd To address issue #413 --- hardware/PiLcd/nrlcd.py | 8 +++++--- hardware/PiLcd/package.json | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hardware/PiLcd/nrlcd.py b/hardware/PiLcd/nrlcd.py index 623372da..de4cc012 100755 --- a/hardware/PiLcd/nrlcd.py +++ b/hardware/PiLcd/nrlcd.py @@ -35,17 +35,18 @@ LCD_LINE_3 = 0xA0 # LCD RAM address for the 3rd line LCD_LINE_4 = 0xE0 # LCD RAM address for the 4th line # Timing constants -E_PULSE = 0.00005 -E_DELAY = 0.00005 +E_PULSE = 0.0005 +E_DELAY = 0.0005 def lcd_init(): # Initialise display lcd_byte(0x33,LCD_CMD) lcd_byte(0x32,LCD_CMD) - lcd_byte(0x28,LCD_CMD) lcd_byte(0x0C,LCD_CMD) lcd_byte(0x06,LCD_CMD) + lcd_byte(0x28,LCD_CMD) lcd_byte(0x01,LCD_CMD) + time.sleep(E_DELAY) def lcd_string(message): # Send string to display @@ -117,6 +118,7 @@ if len(sys.argv) > 1: LCD_D6 = int(pins[4]) LCD_D7 = int(pins[5]) + GPIO.setwarnings(False) GPIO.setmode(GPIO.BOARD) # Use GPIO BOARD numbers GPIO.setup(LCD_RS, GPIO.OUT) # RS GPIO.setup(LCD_E, GPIO.OUT) # E diff --git a/hardware/PiLcd/package.json b/hardware/PiLcd/package.json index 39be00f5..7d158fe7 100644 --- a/hardware/PiLcd/package.json +++ b/hardware/PiLcd/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-pilcd", - "version" : "0.0.6", + "version" : "0.0.7", "description" : "A Node-RED node for Raspberry Pi to write to HD44780 style LCD panels.", "dependencies" : { },