User avatar
Mahan_Micro
Posts: 44
Joined: Tue Aug 04, 2015 8:52 pm

GPIO Permission In QT

Thu Apr 07, 2016 8:21 am

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
If your Dreams Don't Scare You , They Aren't Big Enough

User avatar
Mahan_Micro
Posts: 44
Joined: Tue Aug 04, 2015 8:52 pm

Re: GPIO Permission In QT

Thu Apr 07, 2016 1:25 pm

Who Can Help Me ?????? :?: :?: :?:
If your Dreams Don't Scare You , They Aren't Big Enough

DirkS
Posts: 10214
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: GPIO Permission In QT

Thu Apr 07, 2016 2:38 pm

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...

User avatar
Mahan_Micro
Posts: 44
Joined: Tue Aug 04, 2015 8:52 pm

Re: GPIO Permission In QT

Thu Apr 07, 2016 8:30 pm

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
If your Dreams Don't Scare You , They Aren't Big Enough

User avatar
procount
Posts: 2055
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: GPIO Permission In QT

Thu Apr 07, 2016 8:37 pm

Try running the program as root from the command line?

Code: Select all

sudo ./programname
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

User avatar
Mahan_Micro
Posts: 44
Joined: Tue Aug 04, 2015 8:52 pm

Re: GPIO Permission In QT

Mon Apr 18, 2016 7:26 am

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:
If your Dreams Don't Scare You , They Aren't Big Enough

DirkS
Posts: 10214
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: GPIO Permission In QT

Mon Apr 18, 2016 8:11 am

Mahan_Micro wrote:I don't know how I can fix it :roll:
I don't think anybody can without seeing your code...

Return to “Beginners”