ch gebe in der Console sudo python program.py ein und erhalte:
Traceback (most recent call last):
File "python001.py", line 4, in <module>
GPIO.setup(26, GPIO.OUT)
RPi.GPIO.ModeNotSetException: Please set mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM)
Hier mein kleines Programm:
Code:import RPi.GPIO as GPIO import time GPIO.setup(26, GPIO.OUT) while True: GPIO.output(26, True) time.sleep(1) GPIO.output(26, False) time.sleep(1)
Lesezeichen