frivga
Posts: 2
Joined: Mon Nov 23, 2015 6:06 pm

problem with GPIO

Mon Nov 23, 2015 6:43 pm

Hello evrybody
I have traied this tutoriel
Image

But it gives me this error
Image
I dont know what s the problem
pleaase give me ur help
thanksss

Navyscourge
Posts: 258
Joined: Sat Oct 24, 2015 1:50 pm

Re: problem with GPIO

Tue Nov 24, 2015 9:39 am

Are you using Wheezy or the latest Jessie, assuming you are running the Raspbian operating system?

Are you running your Python code from a command prompt or in the Python IDE?

It looks like you need permission to set the GPIO pins state (i.e. sudo) but the best answer depends on how you are running the code.

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: problem with GPIO

Tue Nov 24, 2015 10:36 am

Navyscourge wrote: It looks like you need permission to set the GPIO pins state (i.e. sudo) but the best answer depends on how you are running the code.
You can avoid that with GPIOzero.
http://raspi.tv/2015/gpio-zero-introduction
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

frivga
Posts: 2
Joined: Mon Nov 23, 2015 6:06 pm

Re: problem with GPIO

Fri Nov 27, 2015 8:42 pm

I don't know exactely which system I m using
because I have bought a SD card which already instaled in order to work with an lcd touch sreen without looking for a driver....
and I m trying to run it from IDLE because I don't know any other way to do it

User avatar
joan
Posts: 14936
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: problem with GPIO

Fri Nov 27, 2015 8:56 pm

The program wants you to run it with root privileges.

Try starting idle with sudo.

E.g. sudo idle

Return to “Beginners”