Home>

I want to create a program that blinks the LED connected to the raspberry pi with a python program.
Execution content: The LED is repeatedly turned on and off at 0.5 second intervals.

Traceback (most recent call last):
 File "/home/pi/1121sampele1.py", line 9, in<module>
   GPIO.setup (LedGpio, GPIO.out)
 AttributeError: module'RPi.GPIO' has no attribute'out'
Corresponding source code
import RPi.GPIO as GPIO
import time
LedGpio = 18
WaitTime = 0.5
GPIO.setwarnings (False)
GPIO.setmode (GPIO.BCM)
GPIO.setup (LedGpio, GPIO.out)
for i in range (20):
    GPIO.output (LedGpio, True)
    time.sleep (WaitTime)
    GPIO.output (LedGpio, False)
    time.sleep (WaitTime)
GPIO.cleanup ()
What I tried

GPIO was installed on LXTerminal,
I didn't know what caused the error, so I consulted.

The error screen is as shown in the attached photo.

Information (FW/tool version, etc.)

Please provide more detailed information here.