Deleted member 11679
Deleted member 11679
Hello,
I wondered if anyone could help. I got my Pi for Christmas and am playing around with the GPIO functionality. I have had a problem tonight using the rpi.gpio library.
I have been following the GPIO videos on YouTube. have the rpi gpio library installed and have copied the code exactly. Upon executing the code I get the following error:
Traceback (most recent call last):
File “gpiotest.py”, line 5, in <module>
Gpio.setmode(gpio.BCM)
AttributeError: ‘module’ object has no attribute ‘setmode’
Here is my code within the python file:
Import RPi.GPIO as gpio
Import time
#set up pin 14 as an output
gpio.setmode(gpio.BCM)
gpio.setup(14, gpio.OUT)
while True:
gpio.output(14, gpio.HIGH)
time.sleep(1)
gpio.output(14, gpio.LOW)
time.sleep
If anyone could offer any help that would be great.
Thanks,
Tom
I wondered if anyone could help. I got my Pi for Christmas and am playing around with the GPIO functionality. I have had a problem tonight using the rpi.gpio library.
I have been following the GPIO videos on YouTube. have the rpi gpio library installed and have copied the code exactly. Upon executing the code I get the following error:
Traceback (most recent call last):
File “gpiotest.py”, line 5, in <module>
Gpio.setmode(gpio.BCM)
AttributeError: ‘module’ object has no attribute ‘setmode’
Here is my code within the python file:
Import RPi.GPIO as gpio
Import time
#set up pin 14 as an output
gpio.setmode(gpio.BCM)
gpio.setup(14, gpio.OUT)
while True:
gpio.output(14, gpio.HIGH)
time.sleep(1)
gpio.output(14, gpio.LOW)
time.sleep
If anyone could offer any help that would be great.
Thanks,
Tom