Skip to content

Commit

Permalink
Merge pull request #52 from chadkuester/patch-1
Browse files Browse the repository at this point in the history
Update charlcd_rpi_rgb_simpletest.py
  • Loading branch information
evaherrada authored Nov 13, 2020
2 parents 849d352 + 45a4eb0 commit 4b50998
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions examples/charlcd_rpi_rgb_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,24 @@
lcd_rows = 2

# Raspberry Pi Pin Config:
lcd_rs = digitalio.DigitalInOut(board.D26) # pin 4
lcd_en = digitalio.DigitalInOut(board.D19) # pin 6
lcd_d7 = digitalio.DigitalInOut(board.D27) # pin 14
lcd_d6 = digitalio.DigitalInOut(board.D22) # pin 13
lcd_d5 = digitalio.DigitalInOut(board.D24) # pin 12
lcd_d4 = digitalio.DigitalInOut(board.D25) # pin 11
lcd_rs = digitalio.DigitalInOut(board.D26) # LCD pin 4
lcd_en = digitalio.DigitalInOut(board.D19) # LCD pin 6
lcd_d7 = digitalio.DigitalInOut(board.D27) # LCD pin 14
lcd_d6 = digitalio.DigitalInOut(board.D22) # LCD pin 13
lcd_d5 = digitalio.DigitalInOut(board.D24) # LCD pin 12
lcd_d4 = digitalio.DigitalInOut(board.D25) # LCD pin 11
lcd_rw = digitalio.DigitalInOut(
board.D4
) # LCD pin 5. Determines whether to read to or write from the display.
# Not necessary if only writing to the display. Used on shield.

red = pulseio.PWMOut(board.D21)
green = pulseio.PWMOut(board.D12)
blue = pulseio.PWMOut(board.D18)

# Initialise the LCD class
# Initialize the LCD class
# The lcd_rw parameter is optional. You can omit the line below if you're only
# writing to the display.
lcd = characterlcd.Character_LCD_RGB(
lcd_rs,
lcd_en,
Expand All @@ -34,6 +40,7 @@
red,
green,
blue,
lcd_rw,
)

RED = [100, 0, 0]
Expand Down

0 comments on commit 4b50998

Please sign in to comment.