我在使用Intel Galileo和Python的输入键盘上苦苦挣扎。但是,当我尝试使用GPIO定义此引脚时遇到了这个错误
from wiringx86 import GPIOGalileo as gpio
class keypad():
def __init__ (self,ColumnCount=4):
self.KEYPAD =[
[1,2,3,"A"],
[4,5,6,"B"],
[7,8,9,"C"],
["*",0,"#","D"]
]
self.ROW = [9,8,7,6]
self.COLUMN = [5,4,3,2]
def getKey(self):
for j in range(len(self.COLUMN)):
gpio.pinMode(self.COLUMN[j], gpio.OUTPUT)
gpio.digitalWrite(self().COLUMN[j], gpio.LOW)
j=j+1
错误消息:
TypeError:未绑定的方法pinMode()必须以GPIOGalileo实例作为第一个参数来调用(改为使用int实例)