Last active
February 24, 2018 08:26
-
-
Save jamesshannon/88826bab6c668b6c6b89cfb674f6ab9e to your computer and use it in GitHub Desktop.
Revisions
-
jamesshannon revised this gist
Feb 24, 2018 . 1 changed file with 11 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -21,4 +21,14 @@ time.sleep(.2) # The following pins register False on the Waveshare 1.44" LCD # pins = { # 5: 'back', # 26: 'forward', # 13: 'btn', # 6: 'up', # 19: 'down', # 21: 'key1', # 20: 'key2', # 16: 'key3', # } -
jamesshannon created this gist
Feb 24, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ import RPi.GPIO as GPIO import time # Pinout diagram is at https://pinout.xyz/ GPIO.setmode(GPIO.BCM) #SPI uses BCM 8, 9, 10, 11 #The LCD_Config file initializes 8, 24, 25, 27 pins = (23, 4, 17, 22, 5, 6, 0, 13, 19, 26, 12, 16, 20, 21) for pin in pins: GPIO.setup(pin, GPIO.IN, pull_up_down=GPIO.PUD_UP) while 1: for pin in pins: if not GPIO.input(pin): print pin time.sleep(.2) # The following pins register False on the Waveshare 1.44" LCD #