Blink sketch error - gpio/direction: Permission Denied


#1

Arduberry installed on headless Pi (B rev 2). I am using VNC logged in as Pi (not root). Arduino v1.0.1 sketches fail to upload with error message: “gpio/direction: Permission denied”

Any ideas how to resolve this?
Cheers
David


#2

Further to my previous post, attached are the gpio settings and avrdude printout.

The Arduino board settings: Arduino Uno, Programmer: Raspberry Pi GPIO and Serial Port /dev/ttyS0.


#3

Arduberry sketch error: gpio/direction: Permission Denied does not appear when the VNC server is started as root.
David


#4

Hi djuwhite,
So you are unable to upload the code in the normal VNC instance and only able to upload it when you have the VNC started from root, right.

-Karan


#5

Hi Karan,
That’s correct. I also tried to upload txt files to this post showing avrdude response and gpio settings but the upload was blocked with the msg “sorry, this file type is not permitted for security settings”. What file type is permitted?
David


#6

Hi David,
You should try uploading .txt files. I think those work.

-Karan


#7

Hi Karan
Please find attached text files:

  1. AVRDUDE run as pi and as root
  2. Troubleshooting.sh run as root
    David

#8

Hi David,
The avrdude command usually requires you to run it as sudo so I don’t think that is a big problem.

Is there any other problem that you are having here too?

-Karan