slight increase in timings to sort pilcd

To address issue #413
This commit is contained in:
Dave Conway-Jones 2018-03-15 08:35:45 +00:00
parent f92f16fd08
commit b9da5d87d8
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
2 changed files with 6 additions and 4 deletions

View File

@ -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

View File

@ -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" : {
},