Created
February 28, 2020 11:36
-
-
Save benevpi/041db7a103ba0d9ce41c0ed133c19e73 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import board | |
| import digitalio | |
| import adafruit_character_lcd.character_lcd as characterlcd | |
| import time | |
| lcd_rs = digitalio.DigitalInOut(board.D21) | |
| lcd_en = digitalio.DigitalInOut(board.D19) | |
| lcd_d7 = digitalio.DigitalInOut(board.D14) | |
| lcd_d6 = digitalio.DigitalInOut(board.D15) | |
| lcd_d5 = digitalio.DigitalInOut(board.D16) | |
| lcd_d4 = digitalio.DigitalInOut(board.D17) | |
| lcd_columns = 16 | |
| lcd_rows = 2 | |
| lcd = characterlcd.Character_LCD_Mono(lcd_rs, lcd_en, lcd_d4, lcd_d5, lcd_d6, lcd_d7, lcd_columns, lcd_rows) | |
| lcd.message = "Hello\nworld" | |
| while True: | |
| for i in range(1,11): | |
| lcd.move_right() | |
| time.sleep(0.5) | |
| for i in range(1,11): | |
| lcd.move_left() | |
| time.sleep(0.5) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment