>>> GPIO.setup(40, GPIO.OUTPUT)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'RPi.GPIO' has no attribute 'OUTPUT'
>>> GPIO.setup(40, GPIO.OUT)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/rpi/RPi.GPIO2/RPi/core.py", line 1098, in setup
channel[i] = channel_fix_and_validate(channel[i])
File "/home/rpi/RPi.GPIO2/RPi/core.py", line 351, in channel_fix_and_validate
raise RuntimeError("Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM)")
RuntimeError: Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM)
>>> GPIO.setmode(GPIO.BOARD)
>>> GPIO.setup(40, GPIO.OUT)
/home/rpi/RPi.GPIO2/RPi/core.py:1109: UserWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
Further attemps to use channel 21 will fail unless setup() is run again sucessfully
warn("This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.\n \
>>> GPIO.setup(40, GPIO.OUT)