GPIO Attribute Error Help!!!
Posted: Wed Jan 08, 2014 10:09 pm
Hi
I have been following a tutorial which allows for an LED to be turned on and off from a button on a webpage. However I have been unable to run the programme. The tutorial is from the following url: http://mattrichardson.com/Raspberry-Pi-Flask/ and is the third topic.
When ever I run my python script from the LXT terminal I get the following message.
"hello-gpio.py" line 6, in <module>
GPIO.setmode(GPIO.BCM)
AttributeError: 'module' object has no attribute 'setmode'
I have had this issue when I have run programmes with GPIO module in the past. I got round this by running these programmes using idle 3 instead of idle.
If anyone could help me with this it would be much appreciated. Also if someone could also point me in the right direction to a good article/post which provides a script which allows you to turn a pin on/off from a webpage that would be great.
Thanks
Dom
I have been following a tutorial which allows for an LED to be turned on and off from a button on a webpage. However I have been unable to run the programme. The tutorial is from the following url: http://mattrichardson.com/Raspberry-Pi-Flask/ and is the third topic.
When ever I run my python script from the LXT terminal I get the following message.
"hello-gpio.py" line 6, in <module>
GPIO.setmode(GPIO.BCM)
AttributeError: 'module' object has no attribute 'setmode'
I have had this issue when I have run programmes with GPIO module in the past. I got round this by running these programmes using idle 3 instead of idle.
If anyone could help me with this it would be much appreciated. Also if someone could also point me in the right direction to a good article/post which provides a script which allows you to turn a pin on/off from a webpage that would be great.
Thanks
Dom