From d299f51c7758b30776c9b6116bd07a8c9200e9ed Mon Sep 17 00:00:00 2001 From: DJ Sundog Date: Sun, 2 Aug 2020 16:52:54 -0700 Subject: [PATCH] missed nine more --- SoundslabInput.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/SoundslabInput.py b/SoundslabInput.py index e309820..baacc6b 100644 --- a/SoundslabInput.py +++ b/SoundslabInput.py @@ -27,19 +27,19 @@ class SoundslabInputHandler: # Buttons connect to ground when pressed, so we should set them up # with a "PULL UP", which weakly pulls the input signal to 3.3V. - GPIO.setup(BUTTONS, GPIO.IN, pull_up_down=GPIO.PUD_UP) + GPIO.setup(self.BUTTONS, GPIO.IN, pull_up_down=GPIO.PUD_UP) # This is a dictionary of the combination of pins and labels self.LABELLED_BUTTONS = { - 5: NW, - 6: SW, - 16: NE, - 24: SE, - 17: UP, - 27: SELECT, - 22: LF, - 23: DN, - 20: RT + 5: self.NW, + 6: self.SW, + 16: self.NE, + 24: self.SE, + 17: self.UP, + 27: self.SELECT, + 22: self.LF, + 23: self.DN, + 20: self.RT } # Loop through out buttons and attach the "handle_button" function to each