mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
parent
f92f16fd08
commit
b9da5d87d8
@ -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
|
||||
|
@ -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" : {
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user