GPIO et PYTHON 2
Posté : dim. 6 mars 2016 19:29
Salut,
Je n'arrive pas à utiliser GPIO avec Python2 mais uniquement python3.
C'est dommage car j'aimerai utiliser Flask de python mais qui n'est pas validé en python 3...
Quelqu'un peut m'aider ?
sudo python testIR.py
LOG-Declaration IR sur PIN27
Traceback (most recent call last):
File "testIR.py", line 46, in <module>
myIR=IR.IR(27,"BCM")
File "/home/hubo/IR/IR.py", line 24, in __init__
GPIO.setmode(GPIO.BCM)
AttributeError: 'module' object has no attribute 'setmode'
Je n'arrive pas à utiliser GPIO avec Python2 mais uniquement python3.
C'est dommage car j'aimerai utiliser Flask de python mais qui n'est pas validé en python 3...
Quelqu'un peut m'aider ?
sudo python testIR.py
LOG-Declaration IR sur PIN27
Traceback (most recent call last):
File "testIR.py", line 46, in <module>
myIR=IR.IR(27,"BCM")
File "/home/hubo/IR/IR.py", line 24, in __init__
GPIO.setmode(GPIO.BCM)
AttributeError: 'module' object has no attribute 'setmode'