Hello colleagues!
Help me please to solve problem with access to GPIO from Python3.
I have script gpio-test.py:
It is a standard and simple script.
If I run this like pyton gpio-test.py everything is good. LED's blink every two seconds.
But if I run this like python3 gpio-test.py LED's not blink
and I have not any error. So as I right understand the RPi.GPIO is not work under Python3. How I can silve it?
Help me please to solve problem with access to GPIO from Python3.
I have script gpio-test.py:
Code: Select all
import RPi.GPIO as GPIO
import time
led1 = 11
led2 = 13
GPIO.setmode(GPIO.BOARD)
GPIO.setup(led1, GPIO.OUT)
GPIO.setup(led2, GPIO.OUT)
while True:
GPIO.output(led1, True)
GPIO.output(led2, True)
time.sleep(2)
GPIO.output(led1, False)
GPIO.output(led2, False)
time.sleep(2)
It is a standard and simple script.
If I run this like pyton gpio-test.py everything is good. LED's blink every two seconds.
But if I run this like python3 gpio-test.py LED's not blink
