missed nine more
This commit is contained in:
parent
86617753ae
commit
d299f51c77
|
@ -27,19 +27,19 @@ class SoundslabInputHandler:
|
||||||
|
|
||||||
# Buttons connect to ground when pressed, so we should set them up
|
# 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.
|
# 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
|
# This is a dictionary of the combination of pins and labels
|
||||||
self.LABELLED_BUTTONS = {
|
self.LABELLED_BUTTONS = {
|
||||||
5: NW,
|
5: self.NW,
|
||||||
6: SW,
|
6: self.SW,
|
||||||
16: NE,
|
16: self.NE,
|
||||||
24: SE,
|
24: self.SE,
|
||||||
17: UP,
|
17: self.UP,
|
||||||
27: SELECT,
|
27: self.SELECT,
|
||||||
22: LF,
|
22: self.LF,
|
||||||
23: DN,
|
23: self.DN,
|
||||||
20: RT
|
20: self.RT
|
||||||
}
|
}
|
||||||
|
|
||||||
# Loop through out buttons and attach the "handle_button" function to each
|
# Loop through out buttons and attach the "handle_button" function to each
|
||||||
|
|
Loading…
Reference in New Issue