Page 1 of 1

GPIO Permission In QT

Posted: Thu Apr 07, 2016 8:21 am
by Mahan_Micro
Hi
I create a project in QTcreator and I want to Turn on And Off a LED
I use bcm2835 library
when I run This project I see following error :
bcm2835_init: unable to open /dev/mem :permission denied :cry:


how I can fix this problem ?? I want to acces GPIO

Re: GPIO Permission In QT

Posted: Thu Apr 07, 2016 1:25 pm
by Mahan_Micro
Who Can Help Me ?????? :?: :?: :?:

Re: GPIO Permission In QT

Posted: Thu Apr 07, 2016 2:38 pm
by DirkS
Mahan_Micro wrote:Who Can Help Me ?????? :?: :?: :?:
Patience please. Forum members are volunteers and some even have to work for a living.
Give it some time...

Re: GPIO Permission In QT

Posted: Thu Apr 07, 2016 8:30 pm
by Mahan_Micro
DirkS wrote:
Mahan_Micro wrote:Who Can Help Me ?????? :?: :?: :?:
Patience please. Forum members are volunteers and some even have to work for a living.
Give it some time...
Excuse me , You are right

Re: GPIO Permission In QT

Posted: Thu Apr 07, 2016 8:37 pm
by procount
Try running the program as root from the command line?

Code: Select all

sudo ./programname

Re: GPIO Permission In QT

Posted: Mon Apr 18, 2016 7:26 am
by Mahan_Micro
I write these commands in terminal : (test is my project name)

Code: Select all

sudo chown root:root test
sudo chmod u+s test
./test
program runs and my form apear but there is no object on it (push button , text box and...) ! :(

I don't know how I can fix it :roll:

Re: GPIO Permission In QT

Posted: Mon Apr 18, 2016 8:11 am
by DirkS
Mahan_Micro wrote:I don't know how I can fix it :roll:
I don't think anybody can without seeing your code...